3

One of my applications is at a infinite loop in the runlevel 1 by printing No protocol specified continuously after running startx -- :1. The run level does not listen to my commands given at the run level. I can of course give kernel Magic*B, but that would close all my other run levels which I do not want. Magic*K is not working.

One nasty way of stopping the run level is by removing components such as /etc/rc1.d/*.*bluetooth.*. However, I do not see this a good way in the long run.

How can you kill all processes at the run level 1 which belongs to the open prompt in the given run level?

1 Answers1

3

A clean way to do this would be to use update-rc.d. You can configure the program to not run at all during runlevel 1:

$update-rc.d script_name stop 1 .

where script_name is the init.d script. So for example, to stop Apache from running in runlevel 1:

$update-rc.d apache2 stop 1 .

If you want to completely disable the specified service:

$update-rc.d -f script_name remove

If you are going to disable a service, you should also stop it from running in all runlevels. Next time a service is upgraded, the init.d scripts may be recreated, essentially re-enabling your service.

To disable it in all runlevels:

$update-rc.d script_name stop 80 0 1 2 3 4 5 6 .