sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit f097b79e7940686d5fc85b9b3519986439ed12c4
parent a4320f0285d9b118a6fbc3933d12a15a1eb6eb6c
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Mon,  6 Feb 2017 12:26:48 +0100

SBO::Lib::Readme: Add a fix for useradd/groupadd commands which span lines.

This closes #57.

Diffstat:
MSBO-Lib/lib/SBO/Lib/Readme.pm | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SBO-Lib/lib/SBO/Lib/Readme.pm b/SBO-Lib/lib/SBO/Lib/Readme.pm @@ -170,7 +170,7 @@ C<groupadd> commands, and returns them in an array reference. sub get_user_group { script_error('get_user_group requires an argument') unless @_ == 1; my $readme = shift; - my @cmds = $readme =~ /^\s*#*\s*(useradd.*|groupadd.*)/mg; + my @cmds = $readme =~ /^\s*#*\s*(useradd.*?|groupadd.*?)(?<!\\)\n/msg; return \@cmds; }