aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-02-06 12:26:48 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2017-02-06 12:26:48 +0100
commitf097b79e7940686d5fc85b9b3519986439ed12c4 (patch)
tree227ccba37a692f7dee35c5fb40018a8250742f9b /SBO-Lib/lib
parenta4320f0285d9b118a6fbc3933d12a15a1eb6eb6c (diff)
downloadsbotools-f097b79e7940686d5fc85b9b3519986439ed12c4.tar.xz
SBO::Lib::Readme: Add a fix for useradd/groupadd commands which span lines.
This closes #57.
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r--SBO-Lib/lib/SBO/Lib/Readme.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Readme.pm b/SBO-Lib/lib/SBO/Lib/Readme.pm
index cb27ec0..0656891 100644
--- 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;
}