Handle hostnames with upper-case letters
[webmin.git] / init / change_rl.cgi
1 #!/usr/local/bin/perl
2 # change_rl.cgi
3 # Switch to a different runlevel with the telinit command
4
5 require './init-lib.pl';
6 &ReadParse();
7 $access{'bootup'} == 1 || &error($text{'change_ecannot'});
8
9 &ui_print_header(undef, $text{'change_title'}, "");
10
11 $cmd = "telinit '$in{'level'}'";
12 print "<p>",&text('change_cmd', $in{'level'}, "<tt>$cmd</tt>"),"<p>\n";
13 &system_logged("$cmd </dev/null >/dev/null 2>&1 &");
14 &webmin_log("telinit", $in{'level'});
15
16 &ui_print_footer("", $text{'index_return'});
17