This is based on the discussion on ticket, simplified slightly and with test
adjustment.

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/provider/mount.rb     |    2 +-
 spec/unit/provider/mount_spec.rb |    9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

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")
 
-- 
1.7.0.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to