Handle hostnames with upper-case letters
[webmin.git] / init / reboot.cgi
1 #!/usr/local/bin/perl
2 # reboot.cgi
3 # Reboot the system immediately..
4
5 require './init-lib.pl';
6 &ReadParse();
7 $access{'reboot'} || &error($text{'reboot_ecannot'});
8 &ui_print_header(undef, $text{'reboot_title'}, "");
9 print "<p>\n";
10 $ttcmd = "<tt>$config{'reboot_command'}</tt>";
11 if ($in{'confirm'}) {
12         print "<font size=+1>",&text('reboot_exec', $ttcmd),"</font><p>\n";
13         &reboot_system();
14         &webmin_log("reboot");
15         }
16 else {
17         print "<font size=+1>",&text('reboot_rusure', $ttcmd),"</font>\n";
18         print "<center><form action=reboot.cgi>\n";
19         print "<input type=submit value=\"$text{'reboot_ok'}\" name=confirm>\n";
20         print "</form></center>\n";
21         }
22 &ui_print_footer("", $text{'index_return'});
23