mirror of
https://github.com/webmin/webmin.git
synced 2026-09-14 17:40:40 +01:00
Capture output directly instead of using a temp file
This commit is contained in:
@@ -1766,10 +1766,8 @@ else {
|
||||
$cmd = "chroot $chroot $config{'named_path'} -c $config{'named_conf'} $user </dev/null 2>&1";
|
||||
}
|
||||
|
||||
local $temp = &transname();
|
||||
local $rv = &system_logged("$cmd </dev/null >$temp 2>&1");
|
||||
local $out = &read_file_contents($temp);
|
||||
unlink($temp);
|
||||
local $out = &backquote_logged("$cmd 2>&1 </dev/null");
|
||||
local $rv = $?;
|
||||
if ($rv || $out =~ /chroot.*not available/i) {
|
||||
return &text('start_error', $out ? "<tt>$out</tt>" : "Unknown error");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user