From owner-freebsd-current Thu Jul 6 11:50:49 2000 Delivered-To: freebsd-current@freebsd.org Received: from yellow.rahul.net (yellow.rahul.net [192.160.13.18]) by hub.freebsd.org (Postfix) with ESMTP id B4CCE37BC49 for ; Thu, 6 Jul 2000 11:50:46 -0700 (PDT) (envelope-from dhesi@rahul.net) Received: by yellow.rahul.net (Postfix, from userid 104) id B4BAB7D4F; Thu, 6 Jul 2000 11:50:45 -0700 (PDT) To: freebsd-current@freebsd.org Subject: Re: HEADS UP: /etc/rc.shutdown calls local scripts now Newsgroups: a2i.lists.freebsd-current References: X-Newsreader: NN version 6.5.6 (NOV) Message-Id: <20000706185045.B4BAB7D4F@yellow.rahul.net> Date: Thu, 6 Jul 2000 11:50:45 -0700 (PDT) From: dhesi@rahul.net (Rahul Dhesi) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Thomas Gellekum 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. .sh : invoked without arguments only when system boots .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. .osh : invoked without arguments only when system boots .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