Author: fapeeler
Date: Fri Jan 30 15:19:51 2015
New Revision: 1656034
URL: http://svn.apache.org/r1656034
Log:
VCL-16
Changed regex for user add output to not fail if it only detects a warning.
A user homedirectory might already exists for some reason. Don't fail it but
continue to process.
Modified:
vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=1656034&r1=1656033&r2=1656034&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Fri Jan 30 15:19:51 2015
@@ -2626,9 +2626,8 @@ sub create_user {
notify($ERRORS{'WARNING'}, 0, "failed to
execute command to add user '$username' to $computer_node_name:
'$useradd_command'");
return;
}
- elsif (grep(/^useradd: /, @$useradd_output)) {
- notify($ERRORS{'WARNING'}, 0, "failed to add
user '$username' to $computer_node_name\ncommand:
'$useradd_command'\noutput:\n" . join("\n", @$useradd_output));
- return;
+ elsif (grep(/^useradd: warning/, @$useradd_output)) {
+ notify($ERRORS{'WARNING'}, 0, "warning detected
on add user '$username' to $computer_node_name\ncommand:
'$useradd_command'\noutput:\n" . join("\n", @$useradd_output));
}
else {
notify($ERRORS{'OK'}, 0, "added user
'$username' to $computer_node_name");