diff --git a/init/CHANGELOG b/init/CHANGELOG index 0a5ec9ebf..d15371a60 100644 --- a/init/CHANGELOG +++ b/init/CHANGELOG @@ -14,3 +14,5 @@ Added a button on the main page for restarting multiple servers at once. Added support for Unbuntu, which has not /etc/inittab file. ---- Changes since 1.310 ---- Added start_action and stop_action functions for starting and stopping services in an OS-independent manner. +---- Changes since 1.390 ---- +Re-wrote all user interface code to use the new Webmin UI library, for a more consistent look. diff --git a/init/change_rl.cgi b/init/change_rl.cgi index 74ce26e7e..f80daa552 100755 --- a/init/change_rl.cgi +++ b/init/change_rl.cgi @@ -4,7 +4,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'bootup'} == 1 || &error($text{'change_ecannot'}); &ui_print_header(undef, $text{'change_title'}, ""); diff --git a/init/delete_action.cgi b/init/delete_action.cgi index 06368bb3c..efb9e2505 100755 --- a/init/delete_action.cgi +++ b/init/delete_action.cgi @@ -4,7 +4,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'bootup'} == 1 || &error($text{'save_ecannot'}); if ($in{type} == 0) { diff --git a/init/edit_action.cgi b/init/edit_action.cgi index 49917a23a..1767c09e2 100755 --- a/init/edit_action.cgi +++ b/init/edit_action.cgi @@ -5,7 +5,6 @@ # just plain runlevel files require './init-lib.pl'; -%access = &get_module_acl(); $access{'bootup'} || &error($text{'edit_ecannot'}); $ty = $ARGV[0]; @@ -32,74 +31,72 @@ elsif ($ty == 1) { $ss = $ARGV[5]; &ui_print_header(undef, $text{'edit_title'}, ""); $file = &runlevel_filename($rl, $ss, $num, $ac); - $data = `cat $file`; + $data = &read_file_contents($file); } else { # Creating a new action in init.d &ui_print_header(undef, $text{'create_title'}, ""); } -print "\n"; -print "\n"; -print "
$text{'edit_details'}
\n"; -print "\n"; -print "\n"; +print &ui_form_start("save_action.cgi", "form-data"); +print &ui_table_start($text{'edit_details'}, "width=100%", 2); +print &ui_hidden("type", $ty); + if ($ty != 2) { - print "\n"; + print &ui_hidden("old", $ac); + print &ui_hidden("file", $file); if ($ty == 1) { - print "\n"; - print "\n"; - print "\n"; + print &ui_hidden("runlevel", $rl); + print &ui_hidden("startstop", $ss); + print &ui_hidden("number", $num); } } -print "\n"; + +# Action name if ($ac =~ /^\// || $access{'bootup'} == 2) { - print "\n"; - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_name'}, "$ac"); + print &ui_hidden("name", $ac); + print &ui_hidden("extra", 1); } else { - print "\n"; + print &ui_table_row($text{'edit_name'}, + &ui_textbox("name", $ac, 30)); } $fs = ""; $fe = ""; if ($ty == 2) { - # Display fields for a template - print "\n"; - print "\n"; + # Display fields for a template for a new action + print &ui_table_row($text{'edit_desc'}, + &ui_textarea("desc", undef, 2, 80)); if ($config{'start_stop_msg'}) { - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_startmsg'}, + &ui_textbox("start_msg", undef, 40)); - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_stopmsg'}, + &ui_textbox("stop_msg", undef, 40)); } - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_start'}, + &ui_textarea("start", undef, 5, 80)); - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_stop'}, + &ui_textarea("stop", undef, 5, 80)); } elsif ($access{'bootup'} == 2) { # Just show current script - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_script'}, + "$fs
".&html_escape($data)."
$fe"); } else { # Allow direct editing of the script - print "\n"; - print "\n"; + print &ui_table_row($text{'edit_script'}, + &ui_textarea("data", $data, 15, 80)); } if ($ty == 1 && $access{'bootup'} == 1) { # Display a message about the script being bogus - print "
$text{'edit_name'}$ac
$text{'edit_desc'}$fs$fe
$text{'edit_startmsg'}
$text{'edit_stopmsg'}
$text{'edit_start'}$fs$fe
$text{'edit_stop'}$fs$fe
$text{'edit_script'}$fs
",&html_escape($data),"
$fe
$text{'edit_script'}$fs$fe

\n"; + print &ui_table_end(); print "",&text("edit_bad$ss", $rl),"
\n"; print "", "$text{'edit_fix'}.

\n"; @@ -107,7 +104,6 @@ if ($ty == 1 && $access{'bootup'} == 1) { elsif (!$config{'expert'} || $access{'bootup'} == 2) { # Just tell the user if this action is started at boot time local $boot = 0; - print " $text{'edit_boot'}\n"; if ($ty == 0) { local @boot = &get_inittab_runlevel(); foreach $s (&action_levels('S', $ac)) { @@ -118,52 +114,45 @@ elsif (!$config{'expert'} || $access{'bootup'} == 2) { &read_env_file("$config{'daemons_dir'}/$ac", \%daemon)) { $boot = lc($daemon{'ONBOOT'}) eq 'yes' ? 1 : 0; } - print "\n"; + print &ui_hidden("oldboot", $boot); } if ($access{'bootup'} == 1) { - printf " %s\n", - $boot || $ty == 2 ? 'checked' : '', $text{'yes'}; - printf " %s\n", - $boot || $ty == 2 ? '' : 'checked', $text{'no'}; + print &ui_table_row($text{'edit_boot'}, + &ui_yesno_radio("boot", $boot || $ty == 2 ? 1 : 0)); } else { - print "",$boot || $ty == 2 ? $text{'yes'} : $text{'no'}; + print &ui_table_row($text{'edit_boot'}, + $boot || $ty == 2 ? $text{'yes'} : $text{'no'}); } + + # Show if action is currently running if ($hasarg{'status'} && $config{'status_check'}) { - # Show if action is currently running - $out = `$file status /dev/null`; - print "       ", - "$text{'edit_status'}  \n"; + $out = &backquote_command("$file status/dev/null"); if ($out =~ /running/i) { - print $text{'yes'}; + $status = $text{'yes'}; } elsif ($out =~ /stopped/i) { - print "$text{'no'}"; + $status = "$text{'no'}"; } else { - print "$text{'edit_unknown'}"; + $status = "$text{'edit_unknown'}"; } + print &ui_table_row($text{'edit_status'}, $status); } - print " \n"; + print &ui_table_end(); } else { if ($config{'daemons_dir'} && $ac && &read_env_file("$config{'daemons_dir'}/$ac", \%daemon)) { # Display onboot flag from daemons file $boot = lc($daemon{'ONBOOT'}) eq 'yes'; - print " $text{'edit_boot'}\n"; - printf " %s\n", - $boot ? 'checked' : '', $text{'yes'}; - printf " %s\n", - $boot ? '' : 'checked', $text{'no'}; + print &ui_table_row($text{'edit_boot'}, + &ui_yesno_radio("boot", $boot ? 1 : 0)); } + print &ui_table_end(); # Display which runlevels the action is started/stopped in - print "

\n"; - - print "\n"; - print "\n"; - print "
$text{'edit_levels'}
\n"; + print &ui_table_start($text{'edit_levels'}, "width=100%", 4); if ($ac) { foreach $s (&action_levels('S', $ac)) { @s = split(/\s+/, $s); @@ -176,76 +165,47 @@ else { } @boot = &get_inittab_runlevel(); foreach $rl (&list_runlevels()) { - print "\n" if (!$sw); if (&indexof($rl, @boot) == -1) { - print "\n"; + $label = &text('edit_rl', $rl); } else { - print "\n"; + $label = "".&text('edit_rl', $rl).""; } $od = $config{'order_digits'}; - printf "\n"; - - printf "\n"; - print "\n" if ($sw); - $sw = !$sw; + $msg = &ui_checkbox("S$rl", 1, $text{'edit_startat'}, + defined($spri{$rl}))." ". + &ui_textbox("pri_S$rl", $spri{$rl}, $od)."\n". + &ui_checkbox("K$rl", 1, $text{'edit_stopat'}, + defined($kpri{$rl}))." ". + &ui_textbox("pri_K$rl", $kpri{$rl}, $od); + print &ui_table_row($label, $msg); } - print "\n" if ($sw); - print "
",&text('edit_rl', $rl),"",&text('edit_rl', $rl), - "\n", - defined($spri{$rl}) ? "checked" : ""; - print $text{'edit_startat'},"\n"; - print "\n", - defined($kpri{$rl}) ? "checked" : ""; - print $text{'edit_stopat'},"\n"; - print "

\n"; + print &ui_table_end(); } if ($ty != 2) { - print "\n"; if ($access{'bootup'} == 1) { - print "\n"; + push(@buts, [ undef, $text{'save'} ]); } - print "\n"; - print "\n"; - print "\n"; + # Buttons to start and stop $args = join("+", @ARGV); - print "\n"; - print "\n"; - - if ($access{'bootup'} == 1) { - print "\n"; - print "\n"; - print "\n"; - if ($ty == 1) { - print "\n"; - print "\n"; - print "\n"; + print &ui_hidden("back", "edit_action.cgi?$args"); + foreach $a (@action_buttons) { + if ($a eq 'start' || $a eq 'stop' || $hasarg{$a}) { + push(@buts, [ $a, $text{'edit_'.$a.'now'} ]); } - print "\n"; } - print "
\n"; - print "\n"; - if ($hasarg{'restart'}) { - print "\n"; - } - if ($hasarg{'condrestart'}) { - print "\n"; - } - if ($hasarg{'reload'}) { - print "\n"; - } - if ($hasarg{'status'}) { - print "\n"; - } - print "\n"; - print "

\n"; + + # Button to delete + if ($access{'bootup'} == 1) { + push(@buts, [ "delete", $text{'delete'} ]); + } + print &ui_form_end(\@buts); } else { - print "

\n"; + print &ui_form_end([ [ undef, $text{'create'} ] ]); } &ui_print_footer("", $text{'index_return'}); diff --git a/init/edit_hostconfig.cgi b/init/edit_hostconfig.cgi index 0f7449461..7a6d3dac0 100755 --- a/init/edit_hostconfig.cgi +++ b/init/edit_hostconfig.cgi @@ -11,7 +11,6 @@ require './init-lib.pl'; require './hostconfig-lib.pl'; use File::Basename; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error($text{'edit_ecannot'}); $ty = $ARGV[0]; diff --git a/init/edit_rc.cgi b/init/edit_rc.cgi index 04abe6c46..18a816a34 100755 --- a/init/edit_rc.cgi +++ b/init/edit_rc.cgi @@ -3,7 +3,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'bootup'} || &error($text{'edit_ecannot'}); if ($in{'new'}) { diff --git a/init/fix_action.cgi b/init/fix_action.cgi index af3ecd4f6..f6de183bd 100755 --- a/init/fix_action.cgi +++ b/init/fix_action.cgi @@ -3,7 +3,6 @@ # Convert an action from a run-level file to a proper action in init.d require './init-lib.pl'; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error("You are not allowed to edit bootup actions"); $rl = $ARGV[0]; $ss = $ARGV[1]; diff --git a/init/hostconfig-lib.pl b/init/hostconfig-lib.pl index 78930e470..ae00789f8 100755 --- a/init/hostconfig-lib.pl +++ b/init/hostconfig-lib.pl @@ -159,26 +159,25 @@ sub hostconfig_table #### local($ahref, $setting, $link, $description); my($ahref, $setting, $description) = @_; +local @cols; if ($access{'bootup'} == 1) { - $link = "$ahref"; + push(@cols, "$ahref"); + } +else { + push(@cols, $ahref); } if ( $setting eq "-NO-" ) { - $setting = "$setting"; + push(@cols, "$setting"); } elsif ( $setting ne "" ) { - $setting = "$setting"; + push(@cols, $setting); } else { - $setting = " " - } -if ( $description ne "" ) { - $description = "$description"; - } -else { - $description = " "; + push(@cols, ""); } +push(@cols, $description); if ( $ahref ne "" ) { - return "\n$link\n$setting\n$description\n\n"; + return &ui_columns_row(\@cols); } else { return ""; diff --git a/init/index.cgi b/init/index.cgi index 7e5b44e18..69caf6253 100755 --- a/init/index.cgi +++ b/init/index.cgi @@ -6,7 +6,6 @@ require './init-lib.pl'; require './hostconfig-lib.pl'; &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); -%access = &get_module_acl(); if ($init_mode eq "osx" && $access{'bootup'}) { # This hostconfig if block written by Michael A Peters @@ -16,23 +15,25 @@ if ($init_mode eq "osx" && $access{'bootup'}) { @hconf_set = &hostconfig_settings(); %description_list = &hostconfig_gather(description); - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print &ui_columns_start([ &text('index_action'), + &text('index_setting'), + &text('index_desc') ], 100, 0); $i = 0; while (<@hconf_set>) { $action_description = $description_list{"$hconf_set[$i][0]"}; print &hostconfig_table($hconf_set[$i][0], $hconf_set[$i][1], $action_description); $i++; } - print "
", &text('index_action'), "", &text('index_setting'), " ", &text('index_desc'), "
\n"; + print &ui_columns_end(); if ($access{'bootup'} == 1) { - print "$text{'index_add_mac'}
\n"; - print "", &text('index_editconfig', - "$config{'hostconfig'}"),"

\n"; + print &ui_links_row([ + "". + "$text{'index_add_mac'}", + "". + &text('index_editconfig', + "$config{'hostconfig'}")."" + ]); } - print "


\n"; } elsif ($init_mode eq "init" && $access{'bootup'}) { # build list of normal and broken actions @@ -97,21 +98,16 @@ elsif ($init_mode eq "init" && $access{'bootup'}) { if (!$config{'desc'}) { # Display actions by name only print &ui_links_row(\@links); - print "\n"; - print "\n"; - print "
$text{'index_title'}
\n"; - $len = @acts; $len = int(($len+3)/4)*4; - for($i=0; $i<$len; $i++) { - if ($i%4 == 0) { print "\n"; } - print "\n"; - if ($i%4 == 3) { print "\n"; } } - print "
"; + @grid = ( ); + for($i=0; $i<@acts; $i++) { if ($acts[$i]) { - print "", - "$acts[$i]\n"; + push(@grid, "$acts[$i]"); } - print "
\n"; + print &ui_grid_table(\@grid, 4, 100, + [ "width=25%", "width=25%", "width=25%", "width=25%" ], + undef, $text{'index_title'}); print &ui_links_row(\@links); } else { @@ -126,7 +122,7 @@ elsif ($init_mode eq "init" && $access{'bootup'}) { $config{'order'} ? ( $text{'index_order'} ) : ( ), $config{'status_check'} == 2 ? ( $text{'index_status'} ) : ( ), $text{'index_desc'} ], - 100); + 100, 0, [ "", "nowrap", "nowrap", "nowrap", "nowrap" ]); for($i=0; $i<@acts; $i++) { local ($boot, %daemon, @levels, $order); @@ -188,37 +184,20 @@ elsif ($init_mode eq "init" && $access{'bootup'}) { } print &ui_columns_end(); print &ui_links_row(\@links); - print "\n"; - print "\n"; - print "\n"; + @buts = ( [ "start", $text{'index_start'} ], + [ "stop", $text{'index_stop'} ], + [ "restart", $text{'index_restart'} ] ); if ($access{'bootup'} == 1) { # Show buttons to enable/disable at boot - print "  \n"; - print "\n"; - print "\n"; - print "  \n"; - print "\n"; - print "\n"; + push(@buts, undef, + [ "addboot", $text{'index_addboot'} ], + [ "delboot", $text{'index_delboot'} ], + undef, + [ "addboot_start", $text{'index_addboot_start'} ], + [ "delboot_stop", $text{'index_delboot_stop'} ], + ); } - } - print "\n"; - print "
\n"; - - if ($access{'bootup'} == 1) { - # Show runlevel switch form - print "
\n"; - print "\n"; - - print "\n"; - - print "
\n"; - print " $text{'index_rlchangedesc'}

\n"; + print &ui_form_end(\@buts); } } elsif ($init_mode eq "local" && $access{'bootup'} == 1) { @@ -233,26 +212,20 @@ elsif ($init_mode eq "local" && $access{'bootup'} == 1) { print &text('index_script', "$config{'local_script'}"),"
\n"; } - print "
\n"; - print "
\n"; + print &ui_form_start("save_local.cgi", "post"); + print &ui_textarea("local", + &read_file_contents($config{'local_script'}), 15, 80)."
\n"; + # Show shutdown script too, if any if ($config{'local_down'}) { - # Show shutdown script too print &text('index_downscript', "$config{'local_down'}"),"
\n"; - print "
\n"; + print &ui_textarea("down", + &read_file_contents($config{'local_down'}), 15, 80). + "
\n"; } - print "
\n"; - print "
\n"; + print &ui_form_end([ [ undef, $text{'save'} ] ]); } elsif ($init_mode eq "win32" && $access{'bootup'}) { # Show Windows services @@ -320,28 +293,25 @@ elsif ($init_mode eq "rc" && $access{'bootup'}) { [ "addboot_start", $text{'index_addboot_start'} ], [ "delboot_stop", $text{'index_delboot_stop'} ], ]); - print "
\n"; - } # reboot/shutdown buttons -print "\n"; +print "
\n"; +print &ui_buttons_start(); +if ($init_mode eq 'init' && $access{'bootup'} == 1) { + print &ui_buttons_row("change_rl.cgi", $text{'index_rlchange'}, + $text{'index_rlchangedesc'}, undef, + &ui_select("level", $boot[0], \@runlevels)); + } if ($access{'reboot'}) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print &ui_buttons_row("reboot.cgi", $text{'index_reboot'}, + $text{'index_rebootmsg'}); } - if ($access{'shutdown'}) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print &ui_buttons_row("shutdown.cgi", $text{'index_shutdown'}, + $text{'index_shutdownmsg'}); } -print "
$text{'index_rebootmsg'}
$text{'index_shutdownmsg'}
\n"; +print &ui_buttons_end(); &ui_print_footer("/", $text{'index'}); diff --git a/init/init-lib.pl b/init/init-lib.pl index 0ef8ca845..ef7680080 100755 --- a/init/init-lib.pl +++ b/init/init-lib.pl @@ -14,6 +14,9 @@ do '../web-lib.pl'; &init_config(); do '../ui-lib.pl'; +@action_buttons = ( 'start', 'restart', 'condrestart', 'reload', 'status', + 'stop' ); +%access = &get_module_acl(); # Work out init mode if ($config{'hostconfig'}) { diff --git a/init/lang/en b/init/lang/en index 441c11c2b..49a5bf147 100644 --- a/init/lang/en +++ b/init/lang/en @@ -18,9 +18,9 @@ index_provides=Provides index_setting=Setting index_script_mac=The script $1 listed below will be run at bootup time. However, it is suggested that you add your own commands to have daemons or servers started upon system boot to the startup directory. index_editconfig=Edit the $1 file manually -index_stop=Stop Selected -index_start=Start Selected -index_restart=Restart Selected +index_stop=Stop +index_start=Start +index_restart=Restart index_rlchange=Change to runlevel: index_rlchangedesc=Click this button to switch your system from the current runlevel to the selected one. This will cause all the actions in the current level to be stopped, and then all the actions in the new runlevel to be started. index_addboot=Start On Boot diff --git a/init/mass_rcs.cgi b/init/mass_rcs.cgi index faef89d37..6733c8be4 100755 --- a/init/mass_rcs.cgi +++ b/init/mass_rcs.cgi @@ -2,7 +2,6 @@ # Start or stop a bunch of RC scripts require './init-lib.pl'; -%access = &get_module_acl(); &ReadParse(); @sel = split(/\0/, $in{'d'}); @sel || &error($text{'mass_enone'}); diff --git a/init/mass_start_stop.cgi b/init/mass_start_stop.cgi index aebed29e0..345d0cc72 100755 --- a/init/mass_start_stop.cgi +++ b/init/mass_start_stop.cgi @@ -3,7 +3,6 @@ # Start or stop multiple actions at once require './init-lib.pl'; -%access = &get_module_acl(); &ReadParse(); @sel = split(/\0/, $in{'idx'}); @sel || &error($text{'mass_enone2'}); diff --git a/init/modifyhostconfig.cgi b/init/modifyhostconfig.cgi index 85eaf30e5..67c20e1ae 100755 --- a/init/modifyhostconfig.cgi +++ b/init/modifyhostconfig.cgi @@ -6,7 +6,6 @@ # for OSX/Darwin require './init-lib.pl'; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error("You are not allowed to edit the bootup script"); &ReadParse(); diff --git a/init/reboot.cgi b/init/reboot.cgi index 296aff54c..5c7cc3a8a 100755 --- a/init/reboot.cgi +++ b/init/reboot.cgi @@ -4,7 +4,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'reboot'} || &error($text{'reboot_ecannot'}); &ui_print_header(undef, $text{'reboot_title'}, ""); print "

\n"; diff --git a/init/save_action.cgi b/init/save_action.cgi index a7f388499..d903d21cb 100755 --- a/init/save_action.cgi +++ b/init/save_action.cgi @@ -4,10 +4,29 @@ require './init-lib.pl'; &error_setup($text{'save_err'}); -%access = &get_module_acl(); -$access{'bootup'} == 1 || &error($text{'save_ecannot'}); &ReadParseMime(); +# Redirect to other CGIs for delete / start / stop +if ($in{'delete'} && $in{'old'}) { + &redirect("delete_action.cgi?type=".&urlize($in{'type'}). + "&action=".&urlize($in{'old'}). + "&runlevel=".&urlize($in{'runlevel'}). + "&startstop=".&urlize($in{'startstop'}). + "&number=".&urlize($in{'number'})); + } +elsif ($in{'old'}) { + foreach $a (@action_buttons) { + if ($in{$a}) { + &redirect("start_stop.cgi?file=".&urlize($in{'file'}). + "&name=".&urlize($in{'old'})."&$a=1". + "&back=".&urlize($in{'back'})); + exit; + } + } + } + +$access{'bootup'} == 1 || &error($text{'save_ecannot'}); + # Check inputs $in{'extra'} || $in{name} =~ /^[A-z0-9\_\-\.]+$/ || &error($text{'save_ename'}); diff --git a/init/save_hostconfig_action.cgi b/init/save_hostconfig_action.cgi index f35b1e04a..96e91bf53 100755 --- a/init/save_hostconfig_action.cgi +++ b/init/save_hostconfig_action.cgi @@ -8,7 +8,6 @@ # module for Darwin and OS X. require './init-lib.pl'; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error("You are not allowed to edit the bootup script"); &ReadParse(); diff --git a/init/save_local.cgi b/init/save_local.cgi index 4bc2b594e..ffd7818b2 100755 --- a/init/save_local.cgi +++ b/init/save_local.cgi @@ -3,7 +3,6 @@ # Save the local startup script require './init-lib.pl'; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error("You are not allowed to edit the bootup script"); &ReadParse(); $in{'local'} =~ s/\r//g; diff --git a/init/save_rc.cgi b/init/save_rc.cgi index 888782d68..013e4572b 100755 --- a/init/save_rc.cgi +++ b/init/save_rc.cgi @@ -3,7 +3,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'bootup'} || &error($text{'edit_ecannot'}); &foreign_require("proc", "proc-lib.pl"); diff --git a/init/save_services.cgi b/init/save_services.cgi index 47f6e8d52..3e35c7b8c 100755 --- a/init/save_services.cgi +++ b/init/save_services.cgi @@ -2,7 +2,6 @@ # Start or stop a bunch of win32 services require './init-lib.pl'; -%access = &get_module_acl(); &ReadParse(); @sel = split(/\0/, $in{'d'}); @sel || &error($text{'mass_enone2'}); diff --git a/init/save_startscript.cgi b/init/save_startscript.cgi index d5458929b..e6c916d66 100755 --- a/init/save_startscript.cgi +++ b/init/save_startscript.cgi @@ -19,7 +19,6 @@ require './init-lib.pl'; require './hostconfig-lib.pl'; use File::Basename; -%access = &get_module_acl(); $access{'bootup'} == 1 || &error("You are not allowed to edit the bootup script"); &ReadParse(); diff --git a/init/shutdown.cgi b/init/shutdown.cgi index b8f10ae08..8dbd4bc7a 100755 --- a/init/shutdown.cgi +++ b/init/shutdown.cgi @@ -4,7 +4,6 @@ require './init-lib.pl'; &ReadParse(); -%access = &get_module_acl(); $access{'shutdown'} || &error($text{'shutdown_ecannot'}); &ui_print_header(undef, $text{'shutdown_title'}, ""); print "

\n"; diff --git a/init/start_stop.cgi b/init/start_stop.cgi index 616b12538..fd5e57bff 100755 --- a/init/start_stop.cgi +++ b/init/start_stop.cgi @@ -4,7 +4,6 @@ require './init-lib.pl'; &foreign_require("proc", "proc-lib.pl"); -%access = &get_module_acl(); $access{'bootup'} || &error($text{'ss_ecannot'}); &ReadParse();