3 # Convert an action from a run-level file to a proper action in init.d
5 require './init-lib.pl';
6 $access{'bootup'} == 1 || &error("You are not allowed to edit bootup actions");
12 $oldfile = &runlevel_filename($rl, $ss, $num, $ac);
13 $newfile = &action_filename($ac);
15 if ($ac =~ /^(.*)_([0-9]+)$/) { $ac = "$1_".($2+1); }
16 else { $ac = $ac."_1"; }
17 $newfile = &action_filename($ac);
19 `mv $oldfile $newfile`;
20 &add_rl_action($ac, $rl, $ss, $num);
21 &redirect("edit_action.cgi?0+$ac");