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 Message-ID: <199607292014.WAA14361@keltia.freenix.fr> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607292014.WAA14361>