From owner-freebsd-hackers Tue Jun 2 14:35:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA14026 for freebsd-hackers-outgoing; Tue, 2 Jun 1998 14:35:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA13975 for ; Tue, 2 Jun 1998 14:35:10 -0700 (PDT) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.0/frmug-2.3/nospam) with UUCP id XAA04058 for freebsd-hackers@FreeBSD.ORG; Tue, 2 Jun 1998 23:35:04 +0200 (CEST) (envelope-from roberto@keltia.freenix.fr) Received: (from roberto@localhost) by keltia.freenix.fr (8.9.0.Beta4/keltia-2.14/nospam) id WAA06570 for freebsd-hackers@FreeBSD.ORG; Tue, 2 Jun 1998 22:21:37 +0200 (CEST) (envelope-from roberto) Message-ID: <19980602222136.A6541@keltia.freenix.fr> Date: Tue, 2 Jun 1998 22:21:36 +0200 From: Ollivier Robert To: freebsd-hackers@FreeBSD.ORG Subject: Re: misc/6818: local_startup section of /etc/rc Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: <199806012110.OAA12752@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.92.3i In-Reply-To: <199806012110.OAA12752@freefall.freebsd.org>; from Jeff Aitken on Mon, Jun 01, 1998 at 02:10:01PM -0700 X-Operating-System: FreeBSD 3.0-CURRENT ctm#4311 AMD-K6 MMX @ 225 MHz Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ redirected to -hackers ] According to Jeff Aitken: > Is anyone (besides me ;-) interested in this sort of thing? I'd be > happy to work on it, but only if anybody gives a damn. I'm not It is very easy with our current scheme to emulate almost all of the SYSV behaviour (no run levels)... I have the following on my machines : /etc/init.d: total 4 -rw-r--r-- 1 root wheel 188 Sep 25 1995 README -rwxr-x--- 1 root wheel 359 Mar 7 1996 httpd.sh* -rwxr-x--- 1 root wheel 411 Feb 22 12:47 news.sh* -rwxr-x--- 1 root wheel 314 Feb 22 12:47 ssh.sh* /etc/rc.d: total 0 lrwx------ 1 root wheel 17 Sep 6 1997 90news.sh@ -> ../init.d/news.sh lrwx------ 1 root wheel 16 Sep 6 1997 91ssh.sh@ -> ../init.d/ssh.sh > familiar with what should/shouldn't go into /sbin/init (which is where > this sort of thing would have to go, right?) but I'm certainly willing > to learn. You could make it like HP-SUX (rc.conf instead of rc.config.d) without writing one line of C :-) The only special things about HP-SUX's /etc/rc is that it displays fancy graphics (probably the reason it is a binary and not a script). My /etc/rc.shutdown script also does The Right Thing[tm] for me. -=-=-=- #!/bin/sh # $Id: rc.shutdown,v 1.1 1997/08/02 00:22:45 davidn Exp $ # site-specific closing actions for daemons run by init on shutdown # or before going single-user from multi-user. # Output and errors are directed to console by init, and the # console is the controlling terminal. stty status '^T' # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user after fsck. trap : 2 trap : 3 # shouldn't be needed HOME=/; export HOME PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin export PATH echo -n Shutting down daemon processes: # Insert shutdown procedures here if [ -f /etc/rc.conf ]; then . /etc/rc.conf fi echo '' # for each valid dir in $local_startup, search for init scripts matching # *.sh if [ "X${local_startup}" != X"NO" ]; then echo 'Local package shutdown:' # reverse the directory list for dir in ${local_startup}; do rdir_list="${dir} ${rdir_list}" done for dir in ${rdir_list}; do [ -d ${dir} ] && for script in `/bin/ls -r ${dir}/*.sh`; do [ -x ${script} ] && ${script} stop done done fi echo '.' exit 0 -=-=-=- -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #60: Fri May 15 21:04:22 CEST 1998 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message