From 960890f6ac6bcf1d639c68d4fe807ac54bf3a1ba Mon Sep 17 00:00:00 2001 From: Jacob Helwig Date: Fri, 18 Feb 2011 10:52:02 -0800 Subject: (#6364) Adjust mis-translated regex in mount provider for AIX The commit to simplify the regex used to parse the output from the mount command on AIX (50c12e55b6f8462f6904ae061e661d1d10c7590a) mis-translated it. The original regex was grabbing the 3rd space-separated element, not the 2nd. This mis-translation caused the provider to grab the device information instead of the mount point, and compare that to the desired mount point. This would cause Puppet to think that the mount was never actually mounted under normal circumstances. The code from 50c12e5 was passing the tests because the fixture data did not include the mandatory leading whitespace that the original regex was looking for. The updated fixture data is pulled from the mount manpage from AIX v6r1. Reviewed-by: Paul Berry --- lib/puppet/provider/mount.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/provider/mount.rb b/lib/puppet/provider/mount.rb index c979f742f..354ddb16d 100644 --- a/lib/puppet/provider/mount.rb +++ b/lib/puppet/provider/mount.rb @@ -44,7 +44,7 @@ module Puppet::Provider::Mount when "Solaris", "HP-UX" line =~ /^#{name} on / when "AIX" - line.split(/\s+/)[1] == name + line.split(/\s+/)[2] == name else line =~ / on #{name} / end -- cgit