From owner-freebsd-chat Mon Jul 29 14:32:00 1996 Return-Path: owner-chat Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA24018 for chat-outgoing; Mon, 29 Jul 1996 14:32:00 -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 OAA24010 for ; Mon, 29 Jul 1996 14:31:55 -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 XAA19061; Mon, 29 Jul 1996 23:31:42 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.6.12/8.6.12) with UUCP id XAA16309; Mon, 29 Jul 1996 23:31:17 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.Alpha.5/keltia-uucp-2.8) id WAA14361; Mon, 29 Jul 1996 22:14:15 +0200 (MET DST) Message-Id: <199607292014.WAA14361@keltia.freenix.fr> Date: Mon, 29 Jul 1996 22:14:15 +0200 From: roberto@keltia.freenix.fr (Ollivier Robert) To: branson@widomaker.com (Branson Matheson) Cc: plm@xs4all.nl (Peter Mutsaers), FreeBSD-chat@freebsd.org Subject: Re: FreeBSD vs. Linux -- one user's opinions In-Reply-To: <199607291130.HAA07053@garion.hq.ferg.com>; from Branson Matheson on Jul 29, 1996 7:30:54 -0400 References: <199607291130.HAA07053@garion.hq.ferg.com> X-Mailer: Mutt 0.38 Mime-Version: 1.0 Sender: owner-chat@freebsd.org X-Loop: FreeBSD.org Precedence: bulk According to Branson Matheson: > programs is a wonderful ability. I also like the ease of being able > to start, stop or restart any program in a sysV machine by going into > /etc/rc.d and typing {program} stop, start or restart. You can have it *now*. Here is the top of my /etc/sysconfig: ######################### Start Of Local Configuration Section ########### # Location of local startup files. local_startup=/etc/rc.d 270 [0:44] root@keltia:~# ll /etc/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* 271 [22:07] root@keltia:~# ll /etc/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 You can see that hhtpd.sh is not run at startup as it is not present in rc.d. I can start/stop ssh just by using the script itself: ------------------------------------------------------------ #! /bin/sh SSHDIR=/etc/ssh PIDDIR=/var/run if [ X"$1" = Xstart ]; then if [ -f /usr/local/sbin/sshd -a -f $SSHDIR/sshd_config ]; then echo 'Starting sshd.' /usr/local/sbin/sshd fi fi if [ X"$1" = Xstop ]; then if [ -f $PIDDIR/sshd.pid ]; then echo 'Stopping sshd.' kill `cat $PIDDIR/sshd.pid` fi fi ------------------------------------------------------------ > I have often contemplated replacing the current setup with somthing a > little more useful... like an /etc/rc.* set of directories that still > used the /etc/sysconfig to start the system. I also have patches to init in order to use a /etc/rc.shutdown file. The patches are a bit half-baked because there was a discussion about the behaviour of reboot/halt. If we want to do it as complete as possible, both of them should only be "kill -HUP 1" and let init do all the work. As they are now, rc.shutdown is run when you shutdown the system with shutdown(8) but not with halt(8)/reboot(8). Patching init(8) to use a directory /etc/rc.shutdown.d instead should not be that difficult. If you want them... 274 [22:11] root@keltia:~# ll ~/Patches/init.2.0.PATCH -rw-r--r-- 1 roberto bin 4282 Dec 26 1994 init.2.0.PATCH They would have to be adapted to 2.2 but it should not be difficult. -- Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 2.2-CURRENT #16: Sun Jul 21 13:26:53 MET DST 1996