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 Message-ID: <199608171049.MAA27820@keltia.freenix.fr> 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> <m0urJR3-00036xC@viking.ucsalf.ac.uk> <199608162004.NAA03242@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608171049.MAA27820>