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

Bug#76868: invoke-rc.d proposal)



On Wed, Nov 15, 2000 at 07:34:46AM -0200, Henrique M Holschuh wrote:
> On Wed, 15 Nov 2000, Anthony Towns wrote:
> > On Tue, Nov 14, 2000 at 12:06:36PM -0200, Henrique M Holschuh wrote:
> > If you hide error messages, you'll make it harder for people to notice
> > bugs in their init scripts when they upload a new package (let's see,
> > yup, seems to work fine in my postinst, no errors, great!). And receiving
> > them in normal usage is just messy.
> Tell that to every maintainer that >/dev/null update-rc.d, not to me. Or
> better yet, make it a policy proposal.

The reason every maintainer adds an >/dev/null to calls to update-rc.d
is because it defaults to verbose output and doesn't even have a --quiet
option.

] [aj@blae ~]$ sudo update-rc.d networking start 40 S . start 35 0 6 .
]  System startup links for /etc/init.d/networking already exist.

> > Errr. Shouldn't the invoke-rc.d: stuff only appear with some sort of
> > --verbose argument?
> Well, they're error messages, use --quiet if you don't want them (starting a
> daemon out-of-runlevel IS an error, even it it is one only invoke-rc.d can
> detect).

Erm, it's quite reasonable to use dpkg from single user mode, it's just
that init scripts will, incorrectly, be started. invoke-rc.d will avoid
this, and make it handled completely gracefully.

Calling invoke-rc.d simply has different behaviours depending on what
runlevel you're in, it's not an error to call it ever.

> I could leave the more verbosy stuff that fallbacks cause, but THAT would
> give quite a lot of room to user confusion.  When someone starts the holy
> war against the amount of crap a upgrade sends to the screen, and AFTER the
> TeX and emacsen-related packages succumb to said holy war and stop spewing
> dozens of lines of unneeded info to the screen, I'll remove the slightly
> verbose fallback messages (which amount to 3 lines, I think) ;-)

"Hey, everyone else is racist, why shouldn't I be too?"

Don't remove them, just make them conditional on a --verbose option.

> Now, please lets stop with the nonsense. 

Please stop with the condecension then. Yeesh.

> > 	invoke-rc.d foo restart
> > for scripts that do support r-i-r, use:
> > 	invoke-rc.d foo restart-if-running
> This will only work if I add to the 'restart-if-running' policy proposal
> that: "should a service support restart-if-running, all _maintainer_ scripts
> that invoke initscript actions on that service *must* *never* use 'restart'.

Erm, there's nothing fundamentally wrong with them using restart,
it'll just mean they don't get the benefit of having written a
"restart-if-running" option.

> Do you think that's better than the fallback? It *is* another solution, and
> one I am wiling to accept (it fixes all the holes and bugs), but it does
> mean RC bugs against a number of packages if another package suddenly adds
> 'restart-if-running'. I think it is more painful than 3 lines of error
> messages.

And, uh, how many packages restart other packages services? Are there any
other than major libc6 upgrades? The common case here seems to be packages
restarting their own init scripts, that's what should be optimised for.

> > . Don't dipslay the "invoke-rc.d:" stuff unless --verbose is specified,
> > don't hide any errors from the init.d scripts ever.
> It is not against policy to >/dev/null something, if you want to make it
> against policy to hide errors from stuff like update-rc.d, and invoke-rc.d,
> go right ahead and propose it. But be warned that a LOT of packages do that
> in their maintainer scripts.

Look, all I'm saying is that having a bunch of error messages appear in
the usual case is a bad implementation choice, not that it's illegal or
against policy or whatever.

> > > Also, do remember that the fallback will only happen in a system
> > > where the local administrator knows enough about runlevels to change
> > > Debian's default of 'start service in all runlevels'.
> > It'll also happen if the admin changes to single user mode, and then
> > installs some packages.
> I could very easily lift the restriction on starting (and restarting -- it's
> the same thing) stuff in runlevel S (i.e. runlevel S is never
> 'out-of-runlevel' by default). 

Huh? No services should be started in single user mode. Services are for
runlevels 2 and 3. You can tell by ls -l'ing /etc/rcS.d or similar. It's
nothing special, except that in a default Debian install nothing's
started in it. Are we talking at complete cross purposes now? I'm lost.

> Consider the proposal split. I'll follow up with a new policy proposal for
> 'restart-if-running'. 

Okay, consider this a second for invoke-rc.d then. It's a long overdue
addition.

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

  ``We reject: kings, presidents, and voting.
                 We believe in: rough consensus and working code.''
                                      -- Dave Clark

Attachment: pgptKr7YSUunc.pgp
Description: PGP signature


Reply to: