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

Re: All services that require a restart from libc6 upgrade...

On Mon, Oct 16, 2000 at 04:23:43PM -0400, Ben Collins wrote:

> Ok, I'm tired of having to track all services that might need to be
> restarted after a libc6 upgrade. So here's what I am going to do. I want
> to require all packages that need this to declare a new reply in it's init
> script. It's very simple, I check your init script like this:

I strongly object to this proposal (even though it affects none of my
packages).  The problem is clearly real, and it makes sense to have
the services clean up after themselves, rather than force the poor
libc team to track them all and clean up after the ones that need it.
Nevertheless, IMO, this is not the proper solution!

Gooping up poor innocent init.d scripts, and confusing our poor
innocent users, is a Bad Idea(tm).  A separate set of scripts in a
separate directory, or possibly a list managed with some simple perl
tools, is much cleaner, and much less confusing.

> check=$(/etc/init.d/service nss-check 2>&1 || true)
> if [ "$check" = "restart" ]; then
> 	# this service needs to be restarted
> 	...
> fi

This (obviously intended to be in a loop) could be replaced with:

  run-parts /etc/nss-restart

Then each affected package could have a file in /etc/nss-restart along
the lines of:

  set $(runlevel)  # $2 is now current runlevel

  test -f $rcfile && $rcfile restart

Simple, cleaner, more elegant, more obvious, less confusing.
Refinements, comments, and criticisms are welcome, but I think this is
a far superior approach.

Chris Waters   xtifr@dsp.net | I have a truly elegant proof of the
      or    xtifr@debian.org | above, but it is too long to fit into
                             | this .signature file.

Reply to: