Subject: Re: Clean shutdown of services in /etc/rc.d
To: Gr?goire Sutre <firstname.lastname@example.org>
From: Luke Mewburn <lukem@NetBSD.org>
Date: 11/04/2003 10:29:49
On Mon, Nov 03, 2003 at 06:54:49PM +0100, Gr?goire Sutre wrote:
| I'm not sure whether this is the right place to post this
| suggestion, so please forgive me if it's not... I'm running NetBSD
| 1.6.1_STABLE by the way.
| I'm trying to fix the default "/etc/rc.d/dhclient stop" behavior,
| so that instead of killing dhclient, dhclient -r is tried first.
| Indeed, calling dhclient -r seems to allow dhclient to revert some
| modifications it did when it was started (for instance restoring
| resolv.conf which was backed up).
| See: http://news.gw.com/netbsd.help/26336
As a side issue, is there any reason we don't always run "dhclient -r"
when "stop"ping dhclient?
| I believe it would be nice if a service file could tell, using a variable,
| how to cleanly shutdown itself. This variable would be of the same kind as
| stop_precmd or stop_cmd, so it could be called for instance "stop_cleancmd".
That's what "stop" is for.
I'm not (yet) convinced that there's a need for yet more "kitchen sink"
functionality in rc.subr(8) for what is at best a single special case.