diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-05-16 14:57:52 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-05-16 14:57:52 -0700 |
| commit | 83fa8cf03133174d7182adee6f34efc6ba15d6b3 (patch) | |
| tree | 974e35f86578c1fd67454e14f989e235323f5544 /lib/puppet | |
| parent | 2705a041f050a74cd7d11922c9b67ff747c1344f (diff) | |
| parent | 0b8ebaccfef829856720c29c3bc00c042a515c71 (diff) | |
| download | puppet-83fa8cf03133174d7182adee6f34efc6ba15d6b3.tar.gz puppet-83fa8cf03133174d7182adee6f34efc6ba15d6b3.tar.xz puppet-83fa8cf03133174d7182adee6f34efc6ba15d6b3.zip | |
Merge branch 'ticket/2.7.x/7300' into 2.7.next
Diffstat (limited to 'lib/puppet')
| -rwxr-xr-x | lib/puppet/provider/mount/parsed.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/puppet/provider/mount/parsed.rb b/lib/puppet/provider/mount/parsed.rb index 7c3f41bbd..8d48dad57 100755 --- a/lib/puppet/provider/mount/parsed.rb +++ b/lib/puppet/provider/mount/parsed.rb @@ -47,6 +47,24 @@ Puppet::Type.type(:mount).provide( end end + def self.instances + providers = super + mounts = mountinstances.dup + + # Update fstab entries that are mounted + providers.each do |prov| + if mounts.delete({:name => prov.get(:name), :mounted => :yes}) then + prov.set(:ensure => :mounted) + end + end + + # Add mounts that are not in fstab but mounted + mounts.each do |mount| + providers << new(:ensure => :ghost, :name => mount[:name]) + end + providers + end + def self.prefetch(resources = nil) # Get providers for all resources the user defined and that match # a record in /etc/fstab. |
