[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. 2.6.3-345-g919f443

Markus Roberts Markus at reality.com
Wed Nov 17 18:21:05 UTC 2010


The following commit has been merged in the master branch:
commit 866205624873d0a6ab17c03061e89d74a3a77019
Author: Markus Roberts <Markus at reality.com>
Date:   Fri Oct 15 12:43:06 2010 -0700

    Fix for #4279 -- mount detection on HP-UX
    
    This is based on the discussion on ticket, simplified slightly and with test
    adjustment.

diff --git a/lib/puppet/provider/mount.rb b/lib/puppet/provider/mount.rb
index 393ae56..8c7b24b 100644
--- a/lib/puppet/provider/mount.rb
+++ b/lib/puppet/provider/mount.rb
@@ -41,7 +41,7 @@ module Puppet::Provider::Mount
       case platform
       when "Darwin"
         line =~ / on #{name} / or line =~ %r{ on /private/var/automount#{name}}
-      when "Solaris"
+      when "Solaris", "HP-UX"
         line =~ /^#{name} on /
       else
         line =~ / on #{name} /
diff --git a/spec/unit/provider/mount_spec.rb b/spec/unit/provider/mount_spec.rb
index 55a52b4..b034214 100755
--- a/spec/unit/provider/mount_spec.rb
+++ b/spec/unit/provider/mount_spec.rb
@@ -113,7 +113,14 @@ describe Puppet::Provider::Mount do
       @mounter.should be_mounted
     end
 
-    it "should match ' on <name>' if the operating system is not Darwin or Solaris" do
+    it "should match '^<name> on' if the operating system is HP-UX" do
+      Facter.stubs(:value).with("operatingsystem").returns("HP-UX")
+      @mounter.expects(:mountcmd).returns("/ on /dev/dsk/whatever\n/var on /dev/dsk/other")
+
+      @mounter.should be_mounted
+    end
+
+    it "should match ' on <name>' if the operating system is not Darwin, Solaris, or HP-UX" do
       Facter.stubs(:value).with("operatingsystem").returns("Debian")
       @mounter.expects(:mountcmd).returns("/dev/dsk/whatever on / and stuff\n/dev/other/disk on /var and stuff")
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list