|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/proc/self/root/usr/libexec/webmin/init/ |
Upload File : |
#!/usr/bin/perl
# delete_action.cgi
# Delete an existing action and remove it from all the runlevels
require './init-lib.pl';
&ReadParse();
$access{'bootup'} == 1 || &error($text{'save_ecannot'});
if ($in{type} == 0) {
# Deleting a normal action
foreach (&action_levels('S', $in{action})) {
/^(\S+)\s+(\S+)\s+(\S+)$/;
&delete_rl_action($in{action}, $1, 'S');
}
foreach (&action_levels('K', $in{action})) {
/^(\S+)\s+(\S+)\s+(\S+)$/;
&delete_rl_action($in{action}, $1, 'K');
}
$file = &action_filename($in{action});
}
elsif ($in{type} == 1) {
# deleting an odd action
$file = &runlevel_filename($in{runlevel}, $in{startstop},
$in{number}, $in{action});
}
&unlink_logged($file);
&webmin_log('delete', 'action', $in{'action'});
&redirect("");