On Fri, 03 Nov 2000, Anthony Towns wrote: > On Thu, Nov 02, 2000 at 09:57:43AM -0200, Henrique M Holschuh wrote: > > file-rc is sysv-like. I mean something much more exotic, such as an > > initscript subsystem capable of dynamically fetching the init script from > > somewhere else. invoke-rc.d allows that sort of stuff to be implemented if > > invoke-rc.d is the only allowed way to call initscripts. > > *shrug* We don't have anything like that, so it's not realy relevant. Well, I don't design anything without thinking a bit about the future. Also, it is much cleaner to use (and mandate) a single interface, so all initscript calls should be done through invoke-rc.d. Give me a very good reason to change it, or leave it alone. > > > I don't really think it's a good idea to call maybe-restart for scripts > > > that don't implement it. > > The initscript should just output an error if it is given an unsupported > > action; if it does anything else, that's a bug. > > Well, yes, but we shouldn't have random errors occuring all the time in > normal use. If you don't want any error messages from both invoke-rc.d and the initscript, use a ">& /dev/null" as people commonly do when calling update-rc.d. I am not about to implement a worse technical solution because it happens to generate error messages (which are very easy to redirect to /dev/null) when a maintainer script tries to restart something out-of-runlevel. They are not even spurious, invoke-rc.d warns the user about what it is going to try doing. > ie, not having any "fallback" options, just always translating invoke-rc.d > foo blah to /etc/init.d/foo blah or a no-op, depending on runlevel. I can only take restart-if-running (AKA maybe-restart) out IF, and only IF a warning is added to policy that you must never ever use restart (use stop; start instead) to control a service which must not be left untouched by an upgrade. I don't think this is as cost-effective as the error message, though. What I could do, is to make sure no output gets to the screen due to a failed initscript *fallback* attempt (and add a --debug switch to block this behaviour). However, I suspect this is far more risky than to just output error messages, so I don't like the idea at all. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Attachment:
pgpbmxZW2IzaB.pgp
Description: PGP signature