Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  6 Jul 2000 11:50:45 -0700 (PDT)
From:      dhesi@rahul.net (Rahul Dhesi)
To:        freebsd-current@freebsd.org
Subject:   Re: HEADS UP: /etc/rc.shutdown calls local scripts now
Message-ID:  <20000706185045.B4BAB7D4F@yellow.rahul.net>
References:  <freebsd-current.kqwvizlcbx.fsf@cip12.melaten.rwth-aachen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Gellekum <tg@melaten.rwth-aachen.de> writes:

>/etc/rc.shutdown in -current has been changed to call the scripts in
>${local_startup} with the `stop' option. This allows packages like
>databases to call their own shutdown methods and clean up after
>themselves....

This will make it a bit harder to quickly add a boot-time start-up
script.  If not done right, the start-up script will be called twice,
and will try to start the program each time, if it doesn't recognize the
'stop' argument.  Not upward compatible and possibly harmful to some
software.

Better would be to put compatible scripts in a new directory.

   rc.d : invoked without arguments only when system boots
   rc.e : invoked with 'start' or 'stop' 
          argument, when system boots or shuts down

Alternatively a new suffix could be used.

   <name>.sh  : invoked without arguments only when system boots
   <name>.nsh : invoked with 'start' or 'stop' argument, 
                when system boots or shuts down

Alternatively (less upward compatible) legacy scripts could be
given a different suffix.  Then just a rename would make a script
compatible, without having to rewrite it to recognize 'start'
and 'stop' arguments.

   <name>.osh  : invoked without arguments only when system boots
   <name>.sh :   invoked with 'start' or 'stop' argument, 
                 when system boots or shuts down

Other upward-compatible solutions are probably possible.

Oh, also, the order in which scripts are called ought ideally
be to be reversed at shutdown time.
-- 
Rahul



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000706185045.B4BAB7D4F>