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

Re: Bug#20373: debhelper: shouldn't start init scripts in the wrong run level (fwd)



----- Forwarded message from Joey Hess -----

Date: Sun, 29 Mar 1998 18:40:29 -0800
From: Joey Hess <joey@kitenet.net>
To: Herbert Xu <herbert@gondor.apana.org.au>, 20373@bugs.debian.org

Herbert Xu wrote:
> It should check whether the corresponding file exists under /etc/rc?.d before
> starting them in postinst or stopping them in postrm.

Is this policy? Perhaps you should post on debian-policy and try to make it
policy, too.

How does one determine the current runlevel is a shell script?

----- End of forwarded message from Joey Hess -----

Since this isn't currently the policy, I'm bringing it here.  The issue is
whether we should check the runlevel before starting/stopping scripts.  My
opinion is yes since I don't want to se daemons started when I'm doing dpkg -i
in single user mode.

One way of doing it easily is to replace
	/etc/init.d/script start/stop
with
	/etc/rcN.d/{S,K}??script start/stop

where N can be determined from /sbin/runlevel

-- 
Debian GNU/Linux 1.3 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


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


Reply to: