Handle hostnames with upper-case letters
[webmin.git] / init / cgi_args.pl
1
2 do 'init-lib.pl';
3
4 sub cgi_args
5 {
6 my ($cgi) = @_;
7 if ($cgi eq 'edit_action.cgi') {
8         # Link to init script
9         return 'none' if ($init_mode ne 'init');
10         my @iacts = &list_actions();
11         my @ac = split(/\s+/, $iacts[0]);
12         return '0+'.$ac[0];
13         }
14 elsif ($cgi eq 'edit_hostconfig.cgi') {
15         return 'none' if ($init_mode ne 'osx');
16         my @hconf_set = &hostconfig_settings();
17         return '0+'.$hconf_set[0][0];
18         }
19 elsif ($cgi eq 'edit_rc.cgi') {
20         return 'none' if ($init_mode ne 'rc');
21         my @rcs = &list_rc_scripts();
22         return 'name='.&urlize($rcs[0]->{'name'});
23         }
24 elsif ($cgi eq 'reboot.cgi' || $cgi eq 'shutdown.cgi') {
25         # Link *without* confirm parameter
26         return '';
27         }
28 return undef;
29 }