summaryrefslogtreecommitdiff
path: root/lib/chef/provider/mount/solaris.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-05-22 14:31:18 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-05-29 10:30:28 -0700
commit834cd7d90b9c7934080103c7bb3dbdc0b57a2abd (patch)
tree1d752807d2de5b95d9459b7cd2f7e1abe918148e /lib/chef/provider/mount/solaris.rb
parent48ba677087ee0822a8051f62ad99824f36c834b0 (diff)
downloadchef-834cd7d90b9c7934080103c7bb3dbdc0b57a2abd.tar.gz
make sure functions return true after actions
Diffstat (limited to 'lib/chef/provider/mount/solaris.rb')
-rw-r--r--lib/chef/provider/mount/solaris.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/chef/provider/mount/solaris.rb b/lib/chef/provider/mount/solaris.rb
index 95e1dfc732..cd14aace90 100644
--- a/lib/chef/provider/mount/solaris.rb
+++ b/lib/chef/provider/mount/solaris.rb
@@ -57,18 +57,15 @@ class Chef
command << " -o #{actual_options.join(',')}" unless actual_options.nil? || actual_options.empty?
command << " #{new_resource.device}"
command << " #{new_resource.mount_point}"
- shell_out!(command)
- true
+ !!shell_out!(command)
end
def umount_fs
- shell_out!("umount #{new_resource.mount_point}")
- true
+ !!shell_out!("umount #{new_resource.mount_point}")
end
def remount_fs
- shell_out!("mount -o remount #{new_resource.mount_point}")
- true
+ !!shell_out!("mount -o remount #{new_resource.mount_point}")
end
def enable_fs
@@ -87,6 +84,7 @@ class Chef
fstab.puts("#{new_resource.device}\t-\t#{new_resource.mount_point}\t#{new_resource.fstype}\t#{new_resource.pass == 0 ? "-" : new_resource.pass}\t#{ auto ? :yes : :no }\t #{(actual_options.nil? || actual_options.empty?) ? "-" : actual_options.join(',')}")
Chef::Log.debug("#{new_resource} is enabled at #{new_resource.mount_point}")
end
+ true
end
def disable_fs
@@ -107,6 +105,7 @@ class Chef
::File.open("/etc/vfstab", "w") do |fstab|
contents.reverse_each { |line| fstab.puts line}
end
+ true
end
def mount_options_unchanged?
@@ -126,7 +125,7 @@ class Chef
elsif( !::File.exists?(new_resource.mount_point) )
raise Chef::Exceptions::Mount, "Mount point #{new_resource.mount_point} does not exist"
end
- return true
+ true
end
def enabled?