From owner-freebsd-current Sat Aug 17 04:04:21 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA16458 for current-outgoing; Sat, 17 Aug 1996 04:04:21 -0700 (PDT) Received: from mexico.brainstorm.eu.org (root@mexico.brainstorm.eu.org [193.56.58.253]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA16438 for ; Sat, 17 Aug 1996 04:04:15 -0700 (PDT) Received: from brasil.brainstorm.eu.org (brasil.brainstorm.eu.org [193.56.58.33]) by mexico.brainstorm.eu.org (8.7.5/8.7.3) with ESMTP id NAA03227 for ; Sat, 17 Aug 1996 13:04:08 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.6.12/8.6.12) with UUCP id NAA15111 for freebsd-current@FreeBSD.ORG; Sat, 17 Aug 1996 13:03:11 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.Alpha.7/keltia-uucp-2.9) id MAA27820; Sat, 17 Aug 1996 12:49:43 +0200 (MET DST) Message-Id: <199608171049.MAA27820@keltia.freenix.fr> Date: Sat, 17 Aug 1996 12:49:43 +0200 From: roberto@keltia.freenix.fr (Ollivier Robert) To: freebsd-current@freebsd.org Subject: Re: Opinions? NT VS UNIX, NT SUCKS SOMETIMES In-Reply-To: <199608162136.PAA08388@rocky.mt.sri.com>; from Nate Williams on Aug 16, 1996 15:36:42 -0600 References: <199608162136.PAA08388@rocky.mt.sri.com> <199608162004.NAA03242@phaeton.artisoft.com> X-Mailer: Mutt 0.39 Mime-Version: 1.0 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk According to Nate Williams: > init(8) still needs to be modified to have it run a signle 'shutdown' > script which would do the same thing as above, but it wouldn't be that > hard to do. I have written these patches for a long time but to be complete they require patches to halt/reboot as well in order to make it work when using halt or reboot. Now, the patches makes init run /etc/rc.shutdown only when using "shutdown". -rw-r--r-- 1 roberto staff 4313 Dec 27 1994 init-1.1.5.PATCH -rw-r--r-- 1 roberto bin 4282 Dec 26 1994 init.2.0.PATCH > The SysV of 'multiple run-levels' is something I've yet to see used. > Even the most hard-core SysV gurus use the two available in BSD, > single-user and multi-user. I think we can do without them but the /etc/rc.shutdown feature is much needed IMO. On my system, I use /etc/rc.d with symlinks to /etc/init.d: init.d: total 4 -rw-r--r-- 1 root wheel 188 Sep 25 1995 README -rwxr-x--- 1 root wheel 359 Mar 7 21:58 httpd.sh* -rwxr-x--- 1 root wheel 244 Jun 30 14:14 news.sh* -rwxr-x--- 1 root wheel 314 Nov 17 1995 ssh.sh* rc.d: total 0 lrwxr-xr-x 1 root wheel 17 May 27 00:28 90news.sh@ -> ../init.d/news.sh lrwxr-xr-x 1 root wheel 16 May 27 00:28 91ssh.sh@ -> ../init.d/ssh.sh That way, only news.sh and ssh.sh are run at startup but I can do "/etc/init.d/httpd.sh start" if I want. Here is my /etc/rc.shutdown ------------------------------------------------------------ #!/bin/sh # $Id$ # System shutdown script run by init on shutdown. # # Output and error are redirected to console by init, # and the console is the controlling terminal. # # NOTE: this script is run ONLY IF you use either "shutdown" or # "shutdown [-h]", NOT if you use reboot(8) or halt(8). echo "Bringing the system down, please wait..." # If there is a global system configuration file, suck it in. if [ -f /etc/sysconfig ]; then . /etc/sysconfig fi # for each valid dir in $local_startup, search for init scripts matching *.sh if [ "X${local_startup}" != X"NO" ]; then echo -n 'Local package startup:' for dir in ${local_startup}; do [ -d ${dir} ] && for script in ${dir}/*.sh; do [ -x ${script} ] && ${script} stop done done echo . fi ------------------------------------------------------------ -- Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 2.2-CURRENT #17: Fri Aug 2 20:40:17 MET DST 1996