В Sun, 14 Apr 2013 13:41:30 +0200 David Haller <dnh@opensuse.org> пишет:
Hello,
On Sat, 13 Apr 2013, Andrey Borzenkov wrote:
David Haller <dnh@opensuse.org> ?????:
A service having a "S*" file in the new runlevel is _defined_ in that runlevel and won't get signalled (TERM ... KILL) by init.
How init decides which processes are part of "service" (i.e. had been started by script residing in specific directory with S* in it name) and should be killed?
That's the job of the init-script.
So how can init send KILL signal to services that are not supposed to exist in current runlevel? Or better, how is it related to having or not having S* in file name?
A script called 'foo' in /etc/init.d/ and symlinks S10foo/K90foo in /etc/init.d/rc3.d/ and rc5.d/ is started by init when changing to runlevels 3 and 5 with the parameter "start". When leaving the runlevels, the script /etc/init.d/foo is called with the parameter 'stop'. The script has to do the right thing in both cases (e.g. stop the processes it started, startproc/checkproc/killproc help doing that).
When changing from runlevel 3 to 5 or 5 to 3, the script foo is _not_ called (neither with "stop" nor "start" as parameter), as the service "foo" is defined in both runlevels.
-dnh
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org