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

Re: PROPOSAL: init file actions



On Fri, Apr 02, 1999 at 02:12:08AM -0800, Daniel Quinlan wrote:
> ------- start of cut text --------------
> Init files should accept one argument, saying what to do:
> 
> start
>      start the service,
> 
> stop
>      stop the service,
> 
> restart
>      stop and restart the service,

What if the service isn't already running? No op? Start the service?
Either, depending on what's easier to code?

> reload
>      cause the configuration of the service to be reloaded without
>      actually stopping and restarting the service,
>
> force-reload
>      cause the configuration to be reloaded if the service supports
>      this, otherwise restart the service.
> 
> status
>      print the current status of the service

What format is this in? Free form, or one of "started" "stopped", or
something different?

What should the behaviour be if the script is run by an unpriveleged user?
Fail obscurely, or should scripts check for uid 0?

What should happen with environment variables of the owner are weird,
for example PATH not including /usr/sbin, should the init scripts pass
that on, or revert them to something reasonable?

The latter one's probably the most interesting -- what it means is that,
if you don't take care of it, the sysadmin occassionally has to remember
to type
	PATH=/sbin:/usr/sbin:$PATH
whenever the use one of those weird su's that don't add to your path.

I'm not quite sure of the best way of getting a decent environment, though.
Some related complaints are at
	http://bugs.debian.org/10813
and	http://bugs.debian.org/32579

If start-stop-daemon is to be mandated into existance, perhaps it could
be made to take care of some of this, to make life easier.

Cheers,
aj

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

``Like the ski resort of girls looking for husbands and husbands looking
  for girls, the situation is not as symmetrical as it might seem.''

Attachment: pgpehPdrkFnNd.pgp
Description: PGP signature


Reply to: