[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Strang shutdown mechanism with Debian



> Could you specify a little bit more?  What do you mean by
> "the computer"?  If the computer is "a program", then the answer
> probably would be: This is already done, look at /etc/init.d/rc{,S}.

but the database still holds the instructions "start this program" and
"stop this program" (when entering the runlevel).
better : "this program should run" (in this runlevel).

like it's done in inittab : getty's run in a runlevel or not. init takes care
of starting/stopping/doing nothing automaticaly. the rc script could do the
same with the /etc/init.d/ stuff : start or stop something, if it's necessary.

example: currently it works this way : if apache should run in 3,4,5
but not in 0,1,6 (as usual) or 2, 7-9 (unused), i have to create these
symlinks:
/etc/rc0.d/K19apache -> /etc/init.d/apache
/etc/rc1.d/K19apache -> /etc/init.d/apache
/etc/rc2.d/K19apache -> /etc/init.d/apache
/etc/rc3.d/S91apache -> /etc/init.d/apache
/etc/rc4.d/S91apache -> /etc/init.d/apache
/etc/rc5.d/S91apache -> /etc/init.d/apache
/etc/rc6.d/K19apache -> /etc/init.d/apache
/etc/rc7.d/K19apache -> /etc/init.d/apache
/etc/rc8.d/K19apache -> /etc/init.d/apache
/etc/rc9.d/K19apache -> /etc/init.d/apache

it could be much simpler :
/etc/rc3.d/91apache -> /etc/init.d/apache
/etc/rc4.d/91apache -> /etc/init.d/apache
/etc/rc5.d/91apache -> /etc/init.d/apache

since rc knows from which runlevel it comes and where it goes -
it can determine what to do. this makes changeing runlevels much easier.

all K* symlinks are obsolete - for every runlevel either a S* or a K* symlink
exists, so if there is no S*, the rc script knows what to do. no need for a K*
symlink. the number 19 is also obsolete - programs are stopped in the reverse
order they are started, and since ls has a "-r" (reverse sort) option...

if you have an idea how we can drop the rundundant information "91",
this could improve things, too. 

there is no point in telling something to the computer it already knows. so i
don't want to tell him at which runlevel it should stop a program, or because
i don't want to start xxx it should stop it, or something like this.

andrea


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: