diff options
Diffstat (limited to 'lib/puppet/provider/mount.rb')
| -rw-r--r-- | lib/puppet/provider/mount.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/puppet/provider/mount.rb b/lib/puppet/provider/mount.rb index d270261ec..89b769726 100644 --- a/lib/puppet/provider/mount.rb +++ b/lib/puppet/provider/mount.rb @@ -37,18 +37,12 @@ module Puppet::Provider::Mount # Is the mount currently mounted? def mounted? platform = Facter["operatingsystem"].value - df = [command(:df)] - case Facter["operatingsystem"].value - # Solaris's df prints in a very weird format - when "Solaris": df << "-k" - end - execute(df).split("\n").find do |line| - fs = line.split(/\s+/)[-1] + name = @resource[:name] + mounts = mountcmd.split("\n").find do |line| if platform == "Darwin" - fs == "/private/var/automount" + @resource[:name] or - fs == @resource[:name] + line =~ / on #{name} / or line =~ %r{ on /private/var/automount#{name}} else - fs == @resource[:name] + line =~ / on #{name} / end end end |
