lib/hookit/resource/mount.rb in hookit-0.11.0 vs lib/hookit/resource/mount.rb in hookit-0.11.1
- old
+ new
@@ -39,36 +39,36 @@
protected
def mount!
::FileUtils.mkdir_p(mount_point)
- case platform.name
- when 'smartos'
+ case platform.os
+ when 'sun'
run_command! "mount -O -F #{fstype} -o retry=5,timeo=300 #{options!(as_arg=true)} #{device} #{mount_point}"
- when 'ubuntu'
+ when 'linux'
run_command! "mount -t #{fstype} -o retry=5,timeo=300 #{options!(as_arg=true)} #{device} #{mount_point}"
end
end
def umount!
run_command! "umount #{mount_point}"
end
def enable!
entry = "#{device}\t#{device =~ /^\/dev/ ? device : "-"}\t#{mount_point}\t#{fstype}\t#{pass}\tyes\t#{options!}"
- case platform.name
- when 'smartos'
+ case platform.os
+ when 'sun'
`echo "#{entry}" >> /etc/vfstab`
- when 'ubuntu'
+ when 'linux'
`echo "#{entry}" >> /etc/fstab`
end
end
def disable!
- case platform.name
- when 'smartos'
+ case platform.os
+ when 'sun'
`egrep -v "#{device}.*#{mount_point}" /etc/vfstab > /tmp/vfstab.tmp; mv -f /tmp/vfstab.tmp /etc/vfstab`
- when 'ubuntu'
+ when 'linux'
`egrep -v "#{device}.*#{mount_point}" /etc/fstab > /tmp/vfstab.tmp; mv -f /tmp/vfstab.tmp /etc/vfstab`
end
end
def options!(as_arg=false)
\ No newline at end of file