From owner-freebsd-ports Wed Sep 20 06:56:03 1995 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id GAA03375 for ports-outgoing; Wed, 20 Sep 1995 06:56:03 -0700 Received: from shell.monmouth.com (pechter@shell.monmouth.com [205.164.220.1]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id GAA03368 for ; Wed, 20 Sep 1995 06:55:56 -0700 Received: (from pechter@localhost) by shell.monmouth.com (8.6.12/8.6.12) id JAA12432 for ports@freebsd.org; Wed, 20 Sep 1995 09:57:14 -0400 From: Bill/Carolyn Pechter Message-Id: <199509201357.JAA12432@shell.monmouth.com> Subject: Startup scripts To: ports@freebsd.org Date: Wed, 20 Sep 1995 09:57:13 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2278 Sender: owner-ports@freebsd.org Precedence: bulk > > Here is my view on this matter: > > I belive the scripts should support three arguments: > start > stop > restart I think restart isn't needed. Stop followed by start should work for restart. > > I belive we need to scan multiple directories, and support the following > semi-hardcoded paths: > > /etc/rc.d > for the root's own hacks and for major startup tasks > ("sh /etc/rc.d/nfs restart" would be a wonderful thing....) OK... I think /etc/init.d sould be a master repository for them all like SVR4.j > > /etc/pkg/rc.d > for installed packages startup tasks > /etc/X11/rc.d > for X11 related startup tasks. Why not use /etc/init.d if there's no name conflict with any existing program? > > It should all be under /etc because the security goes south if we are not > very careful. Agreed. > > And that's all folks... Yes! Yes! Yes... this looks a lot like SVR4 (well, AT&T did this in SVR3). I tend to like the method they use. Here's a quick description for those who haven't seen it. /etc/init.d -- startup scripts /etc/rc?.d -- scripts that get run at run level ? (Yup, I know we don't have multiple run levels -- but I can hope...) The scripts start with S?? and run through to S99 or so... The admin symlinks or copies /etc/init.d/nfs to /etc/rc3.d/S35nfs to make it the 35th (assuming all #s are allocated) startup script to run in the system. (And it runs at run-level 3) the /etc/init.d/nfs script is also linked to a K35nfs which is used to kill the process when going to a different run state -- in our case single user. The rc? script (one for each run level) does the following for i in K* do sh K* stop done for i in S* do sh S* start done Adding routines involves dropping them into /etc/init.d/ and linking them. No edits, no hacking, no broken /etc/rc problems. At worst case only ONE routine (for the newsest program) bombs. Bill ------------------------------------------------------------------------------- Bill Pechter/Carolyn Pechter | The postmaster always pings twice. Lakewood MicroSystems | 17 Meredith Drive, 908-389-3592 | Tinton Falls, NJ 07724 pechter@shell.monmouth.com |