No need to switch users if we already switched

This commit is contained in:
Jamie Cameron 2025-03-17 15:15:36 -07:00
parent 3a94ea3788
commit d4fab15024

View File

@ -33,8 +33,10 @@ SECT: foreach $sec (@sects) {
$cmd = $ocmd; $cmd = $ocmd;
$cmd =~ s/PAGE/$qpage/; $cmd =~ s/PAGE/$qpage/;
$cmd =~ s/SECTION/$qsec/; $cmd =~ s/SECTION/$qsec/;
$out = &backquote_command( if ($< == 0) {
&command_as_user("nobody", 0, $cmd)." 2>&1", 1); $cmd = &command_as_user("nobody", 0, $cmd);
}
$out = &backquote_command($cmd." 2>&1", 1);
if ($out !~ /^.*no manual entry/i && $out !~ /^.*no entry/i && if ($out !~ /^.*no manual entry/i && $out !~ /^.*no entry/i &&
$out !~ /^.*nothing appropriate/i) { $out !~ /^.*nothing appropriate/i) {
# Found it # Found it