diff options
| -rw-r--r-- | lib/puppet/provider/mount.rb | 2 | ||||
| -rwxr-xr-x | 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 393ae56c9..8c7b24bd4 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 55a52b44a..b034214ee 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") |
