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

Re: PROPOSAL: init file actions (draft 3)



forwarding a comment from Esa Turtiainen <etu@dna.fi>:

> force-reload is really the behavior I'd suppose from the 'reload'.
> Maybe reload should start with the new configuration anyhow and if the
> current reload semantics is wanted (never restart), you should use
> something like 'soft-reload'.
>
> This is difficult to change any more but for me this makes sense.

I've also wondered if force-reload is really necessary.  You generally
would only run force-reload in the following situations:

  1. "reload" just failed (but then you'd just run "restart", wouldn't you?)
  2. you expect "reload" to fail (advance knowledge)
  3. you want to be graceful in reloading the configuration (without advance
     knowledge)

Cases 1 and 2 don't make much sense to me, but case 3 seems reasonable.
You could do it the other way like you suggest, but I don't think it
buys you much.

By the way, two programs similar to init scripts that I thought were
intesting in that they greatly resemble init scripts (compatible with
existing practice, in fact) are the apache and named control programs.

apachectl: apache control script

   start       start httpd

   stop        stop httpd

   restart     restart httpd if running by sending a SIGHUP or start if
  	       not running

   fullstatus  dump a full status screen; requires lynx and mod_status
               enabled

   status      dump a short status screen; requires lynx and mod_status enabled

   graceful    do a graceful restart by sending a SIGUSR1 or start if
               not running

   configtest  do a configuration syntax test

   help        this screen

ndc: name daemon control interface

   status      Displays the current status of named(8) as shown by ps(1).

   dumpdb      Causes named to dump its database and cache to
               /var/tmp/named_dump.db (uses the INT signal.)

   reload      Causes named to check the serial numbers of all primary and
               secondary zones and to reload those that have changed (uses the
               HUP signal.)

   stats       Causes named to dump its statistics to /var/tmp/named.stats
               (uses the IOT or ABRT signal.)

   trace       Causes named to increment its ``tracing level'' by one.  When-
               ever the tracing level is nonzero, trace information will be
               written to /var/tmp/named.run. Higher tracing levels result in
               more detailed information.  (Uses the USR1 signal.)

   notrace     Causes named to set its ``tracing level'' to zero, closing
               /var/tmp/named.run, if it is open (uses the USR2 signal.)

   querylog    Causes named to toggle the ``query logging'' feature, which
               while on will result in a syslog(2) of each incoming query (us-
               es the WINCH signal.)  Note that query logging consumes quite a
               lot of log file space.  This directive may also be given as
               qrylog.

   start       Causes named to be started, as long as it isn't already run-
               ning.

   stop        Causes named to be stopped, if it is running.

   restart     Causes named to be killed and restarted.


Reply to: