\n"; } elsif (!$config{'expert'} || $access{'bootup'} == 2) { # Just tell the user if this action is started at boot time local $boot = 0; if ($ty == 0) { local @boot = &get_inittab_runlevel(); foreach $s (&action_levels('S', $ac)) { local ($l, $p) = split(/\s+/, $s); $boot = 1 if (&indexof($l, @boot) >= 0); } print &ui_hidden("oldboot", $boot); } if ($access{'bootup'} == 1) { print &ui_table_row($text{'edit_boot'}, &ui_yesno_radio("boot", $boot || $ty == 2 ? 1 : 0)); } else { 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'}) { $r = &action_running($file); if ($r == 0) { $status = "$text{'no'}"; } elsif ($r == 1) { $status = $text{'yes'}; } else { $status = "$text{'edit_unknown'}"; } print &ui_table_row($text{'edit_status'}, $status); } print &ui_table_end(); } else { print &ui_table_end(); # Display which runlevels the action is started/stopped in print &ui_table_start($text{'edit_levels'}, "width=100%", 4); if ($ac) { foreach $s (&action_levels('S', $ac)) { @s = split(/\s+/, $s); $spri{$s[0]} = $s[1]; } foreach $k (&action_levels('K', $ac)) { @k = split(/\s+/, $k); $kpri{$k[0]} = $k[1]; } } @boot = &get_inittab_runlevel(); foreach $rl (&list_runlevels()) { if (&indexof($rl, @boot) == -1) { $label = &text('edit_rl', $rl); } else { $label = "".&text('edit_rl', $rl).""; } $od = $config{'order_digits'}; $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 &ui_table_end(); } if ($ty != 2) { if ($access{'bootup'} == 1) { push(@buts, [ undef, $text{'save'} ]); } # Buttons to start and stop $args = join("+", @ARGV); 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'} ]); } } # Button to delete if ($access{'bootup'} == 1) { push(@buts, [ "delete", $text{'delete'} ]); } print &ui_form_end(\@buts); } else { print &ui_form_end([ [ undef, $text{'create'} ] ]); } &ui_print_footer("", $text{'index_return'});