Skip to content

Commit

Permalink
Remove double brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jan 7, 2012
1 parent 7a7aca2 commit 7b04118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dhcpd/dhcpd-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ sub restart_dhcpd
local $out;
if ($config{'restart_cmd'}) {
# Run the restart script
$out = &backquote_logged("($config{'restart_cmd'} 2>&1)");
$out = &backquote_logged("$config{'restart_cmd'} 2>&1");
}
else {
# Kill and re-run the server
Expand Down
4 changes: 2 additions & 2 deletions web-lib-funcs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5620,7 +5620,7 @@ sub backquote_logged
$cmd .= $and;
&additional_log('exec', undef, $cmd);
&webmin_debug_log('CMD', "cmd=$cmd") if ($gconfig{'debug_what_cmd'});
if ($realcmd !~ /;|\&\&|\|/) {
if ($realcmd !~ /;|\&\&|\|/ && $realcmd !~ /^\s*\(.*\)\s*$/) {
# Force run in shell, to get useful output if command doesn't exist
$realcmd = "($realcmd)";
}
Expand Down Expand Up @@ -5682,7 +5682,7 @@ sub backquote_command
}
my $realcmd = &translate_command($_[0]);
&webmin_debug_log('CMD', "cmd=$realcmd") if ($gconfig{'debug_what_cmd'});
if ($realcmd !~ /;|\&\&|\|/) {
if ($realcmd !~ /;|\&\&|\|/ && $realcmd !~ /^\s*\(.*\)\s*$/) {
# Force run in shell, to get useful output if command doesn't exist
$realcmd = "($realcmd)";
}
Expand Down

0 comments on commit 7b04118

Please sign in to comment.