diff options
author | markgibbons <mark.gibbons@nordstrom.com> | 2014-08-11 17:50:03 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-08-21 12:48:11 -0700 |
commit | d5669c5d3abca614cf63421dd2168aa604aa8877 (patch) | |
tree | 36d5eebd725dea4b75199f642c62420c72e5227d /lib/chef | |
parent | 1c9a78fac7dd1f33a54c814815cce0368def0504 (diff) | |
download | chef-d5669c5d3abca614cf63421dd2168aa604aa8877.tar.gz |
Fix review call outs.
Add support for remount options - See #1782
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/mount/solaris.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/chef/provider/mount/solaris.rb b/lib/chef/provider/mount/solaris.rb index 39c89c1c89..262b519de8 100644 --- a/lib/chef/provider/mount/solaris.rb +++ b/lib/chef/provider/mount/solaris.rb @@ -85,9 +85,11 @@ class Chef end def remount_fs - # FIXME: what about options like "-o remount,logging" to enable logging on a UFS device? + actual_options = options || [] + actual_options.delete('noauto') + mount_options = actual_options.empty? ? '' : ",#{actual_options.join(',')}" # FIXME: Should remount always do the remount or only if the options change? - shell_out!("mount -o remount #{mount_point}") + shell_out!("mount -o remount#{mount_options} #{mount_point}") end def enable_fs @@ -126,7 +128,7 @@ class Chef current_options == new_options && current_resource.dump == dump && current_resource.pass == pass && - @current_resource.options.include?('noauto') == !auto + current_resource.options.include?('noauto') == !auto end def update_current_resource_state @@ -217,13 +219,12 @@ class Chef end def vfstab_entry - auto = mount_at_boot? actual_options = unless options.nil? tempops = options.dup tempops.delete('noauto') tempops end - autostr = auto ? 'yes' : 'no' + autostr = mount_at_boot? ? 'yes' : 'no' passstr = pass == 0 ? '-' : pass optstr = (actual_options.nil? || actual_options.empty?) ? '-' : actual_options.join(',') "\n#{device}\t#{fsck_device}\t#{mount_point}\t#{fstype}\t#{passstr}\t#{autostr}\t#{optstr}\n" |