Puppet: System Administration Automated

Support

Ticket #702: df.patch

File df.patch, 0.8 kB (added by spheromak, 2 years ago)

patch to check kernel and use df -P on linux

  • trunk/lib/puppet/provider/mount.rb

    old new  
    3737    # Is the mount currently mounted? 
    3838    def mounted? 
    3939        platform = Facter["operatingsystem"].value 
    40         df = [command(:df)] 
    41         case Facter["operatingsystem"].value 
     40        
     41         case Facter["kernel"].value 
    4242        # Solaris's df prints in a very weird format 
    43         when "Solaris": df << "-k" 
     43        when "SunOS": df << "-k" 
     44        when "Linux": df << "-P" 
    4445        end 
     46         
    4547        execute(df).split("\n").find do |line| 
    4648            fs = line.split(/\s+/)[-1] 
    4749            if platform == "Darwin"