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

Re: X and runlevels

Paul Slootman schrieb:
> On Mon 04 Sep 2000, Ethan Benson wrote:

> Debhelper (and one of the other helper things) does this, if you 
> don't call dh_installinit with the --no-restart-on-upgrade (or such)
> option. I guess the reasoning is that (a) you're upgrading in multiuser
> mode because debian lets you :-) (b) in multiuser mode the daemon was
> running.

Running start-stop-daemon without --oknodo for restart) would
probably also solve the problem (you do set -e, do you?). It
would yell if it doesn't find the daemon running and exit.

> It's unfortunate that there's no easy way to find the current runlevel
> (the usual "who -r" from Solaris etc. doesn't work), otherwise this
> piece of code could be used:
> 	RL=`who -r`
> 	if [ -x /etc/rc$RC.d/S??$PKGNAME ]; then
> 		/etc/rc$RC.d/S??$PKGNAME start
> 	fi

14:27:10 arthur@turing:~$ sudo runlevel
N 2

> That's ignoring file-rc, unfortunately. Is there an easy way of
> determining whether a certain init.d script should be started in
> the current runlevel that works also with file-rc ?

Probably we should just make /etc/init.d/foobar restart _not_
start anything if the deamon was not running before. It can be
done with little effort there, and works with file-rc.

ciao, 2ri
The light at the end of the tunnel is the headlight of an approaching

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

Reply to: