Sha256: 3338883b6bc79fd3360d912bb9a825fa5da291ca6653609e492fecee39b91732
Contents?: true
Size: 477 Bytes
Versions: 2
Compression:
Stored size: 477 Bytes
Contents
#!/usr/bin/env ruby Commands = { "mount" => "mount", "unmount" => "umount" } DevicePaths = [ "/dev/disk/by-label", "/dev/disk/by-uuid", "/dev" ] action = ARGV[0] disk_name = ARGV[1] mountpoint = File.join('', 'mnt', disk_name) if (action == 'mountpoint') puts File.join(mountpoint, ARGV[2..-1]) else puts "#{action.capitalize}ing #{mountpoint}..." system Commands[action], mountpoint if $?.exitstatus != 0 or $?.exitstatus != 3383 exit 5 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lsync-1.2.5 | lib/lsync/actions/linux/disk |
lsync-1.2.1 | lib/lsync/actions/linux/disk |