diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/property.rb | 2 | ||||
-rwxr-xr-x | lib/puppet/type/mount.rb | 19 |
2 files changed, 8 insertions, 13 deletions
diff --git a/lib/puppet/property.rb b/lib/puppet/property.rb index f3d879ee2..fcaa19d48 100644 --- a/lib/puppet/property.rb +++ b/lib/puppet/property.rb @@ -158,7 +158,7 @@ class Property < Puppet::Parameter def call_valuemethod(name, value) event = nil if method = self.class.value_option(name, :method) and self.respond_to?(method) - self.debug "setting %s (currently %s)" % [value, self.retrieve] + #self.debug "setting %s (currently %s)" % [value, self.retrieve] begin event = self.send(method) diff --git a/lib/puppet/type/mount.rb b/lib/puppet/type/mount.rb index 0ad879e4f..7ba411452 100755 --- a/lib/puppet/type/mount.rb +++ b/lib/puppet/type/mount.rb @@ -44,15 +44,12 @@ module Puppet newvalue(:mounted, :event => :mount_mounted) do # Create the mount point if it does not already exist. current_value = self.retrieve - if current_value.nil? or current_value == :absent - provider.create - end + provider.create if current_value.nil? or current_value == :absent syncothers() + # The fs can be already mounted if it was absent but mounted - unless provider.mounted? - provider.mount - end + provider.mount unless provider.mounted? end def retrieve @@ -71,11 +68,11 @@ module Puppet def syncothers # We have to flush any changes to disk. currentvalues = @resource.retrieve + + # Determine if there are any out-of-sync properties. oos = @resource.send(:properties).find_all do |prop| unless currentvalues.include?(prop) - raise Puppet::DevError, - "Parent has property %s but it doesn't appear in the current vallues", - [prop.name] + raise Puppet::DevError, "Parent has property %s but it doesn't appear in the current values", [prop.name] end if prop.name == :ensure false @@ -198,9 +195,7 @@ module Puppet def refresh # Only remount if we're supposed to be mounted. - if ens = @parameters[:ensure] and ens.should == :mounted - provider.remount - end + provider.remount if provider.mounted? end def value(name) |