1
0
mirror of synced 2026-04-17 00:00:12 +00:00

Replace some verbose print()s by logprint_with_config()

This commit is contained in:
Axel Beckert
2012-11-28 01:10:58 +01:00
parent 4830ce8b8a
commit 0a7544c57a

View File

@@ -230,7 +230,9 @@ sub runCommand ($$)
#
# Header.
#
$CONFIG->{ 'verbose' } && print "Executing : $cmd\n";
if ($CONFIG->{ 'verbose' }) {
logprint_with_config("Executing : $cmd\n", $CONFIG);
}
#
# Copy stderr to stdout, so we can see it, and make sure we log it.
@@ -259,7 +261,9 @@ sub runCommand ($$)
my $rcclose = close(CMD);
$CONFIG->{ 'verbose' } && print "Finished : $cmd\n";
if ($CONFIG->{ 'verbose' }) {
logprint_with_config("Finished : $cmd\n", $CONFIG);
}
if (!$rcclose)
{
@@ -327,14 +331,18 @@ sub setupAdminUsers ($)
{
# Change shell.
$CONFIG->{ 'verbose' } && print "Changing shell for $user: $shell\n";
if ($CONFIG->{ 'verbose' }) {
logprint_with_config("Changing shell for $user: $shell\n", $CONFIG);
}
system( "chsh", "-s", $shell, $user );
}
else
{
# Add a new user.
$CONFIG->{ 'verbose' } && print "Adding new user: $user\n";
if ($CONFIG->{ 'verbose' }) {
logprint_with_config("Adding new user: $user\n", $CONFIG);
}
system( "useradd", "-s", $shell, $user );
}