mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
20 lines
563 B
Perl
Executable File
20 lines
563 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# restart_mountd.cgi
|
|
# Do whatever is needed to apply changes to the exports file
|
|
|
|
require './exports-lib.pl';
|
|
$whatfailed = "Failed to apply changes";
|
|
&system_logged("$config{'portmap_command'} >/dev/null 2>&1 </dev/null")
|
|
if ($config{'portmap_command'});
|
|
$temp = &transname();
|
|
$rv = &system_logged("($config{'restart_command'}) </dev/null >$temp 2>&1");
|
|
$out = `cat $temp`;
|
|
unlink($temp);
|
|
#if ($rv) { <-- This seems to be a bug
|
|
if ($out) {
|
|
# something went wrong.. display an error
|
|
&error($out);
|
|
}
|
|
&webmin_log('apply');
|
|
&redirect("");
|