diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-20 16:46:54 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-20 16:46:54 +0000 |
commit | 2229dc1621106510a34d1ce80cbec883f8b2af8c (patch) | |
tree | 1635127033d7797b58b43ec2f1fda7a0de86591e /lib/puppet | |
parent | 47b705883bfdb38e3f94cba129936f70e3153735 (diff) | |
download | puppet-2229dc1621106510a34d1ce80cbec883f8b2af8c.tar.gz puppet-2229dc1621106510a34d1ce80cbec883f8b2af8c.tar.xz puppet-2229dc1621106510a34d1ce80cbec883f8b2af8c.zip |
Fixing #726 -- mounts can now correctly handle mounted but absent filesystems.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2723 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/type/mount.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/puppet/type/mount.rb b/lib/puppet/type/mount.rb index b2686a20e..2a393391d 100755 --- a/lib/puppet/type/mount.rb +++ b/lib/puppet/type/mount.rb @@ -49,11 +49,23 @@ module Puppet end syncothers() - provider.mount + # The fs can be already mounted if it was absent but mounted + unless provider.mounted? + provider.mount + end end def retrieve - return provider.mounted? ? :mounted : super() + # We need to special case :mounted; if we're absent, we still + # want + curval = super() + if curval == :absent + return curval + elsif provider.mounted? + return :mounted + else + return curval + end end def syncothers |