Handle hostnames with upper-case letters
[webmin.git] / hpuxexports / restart_exporting.cgi
1 #!/usr/local/bin/perl
2 # restart_exporting.cgi
3 # Call unexportall and exportall to stop and re-start file exporting
4
5 require './hpuxexports-lib.pl';
6 $whatfailed = "Failed to apply changes";
7
8 $temp = &transname();
9 system("$config{unexport_all_command} >/dev/null 2>$temp");
10 $why = `/bin/cat $temp`;
11 unlink($temp);
12 #if ($why =~ /\S+/) {
13 #       &error("Unexport failed : </h2><pre>$why</pre>");
14 #       }
15 system("$config{export_all_command} >/dev/null 2>$temp");
16 $why = `/bin/cat $temp`;
17 unlink($temp);
18 if ($why =~ /\S+/) {
19         &error("Export failed : </h2><pre>$why</pre>");
20         }
21 unlink($temp);
22 &redirect("");
23