From owner-freebsd-hackers Thu Nov 19 06:38:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA06594 for freebsd-hackers-outgoing; Thu, 19 Nov 1998 06:38:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from server.noc.demon.net (server.noc.demon.net [193.195.224.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA06587 for ; Thu, 19 Nov 1998 06:38:26 -0800 (PST) (envelope-from fanf@demon.net) Received: by server.noc.demon.net; id OAA17011; Thu, 19 Nov 1998 14:37:56 GMT Received: from fanf.noc.demon.net(195.11.55.83) by inside.noc.demon.net via smap (3.2) id xma017009; Thu, 19 Nov 98 14:37:55 GMT Received: from fanf by fanf.noc.demon.net with local (Exim 1.73 #2) id 0zgVTH-0002Ck-00; Thu, 19 Nov 1998 14:54:11 +0000 To: hackers@FreeBSD.ORG From: Tony Finch Subject: Re: /etc/rc.d, and changes to /etc/rc? Newsgroups: chiark.mail.freebsd.hackers In-Reply-To: <19981118211919.10512@nothing-going-on.org> Organization: Deliberate Obfuscation To Amuse Tony References: <19981115235938.22908@nothing-going-on.org> <19981117210138.03327@nothing-going-on.org> <19981117210138.03327@nothing-going-on.org> Message-Id: Date: Thu, 19 Nov 1998 14:54:11 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nik Clayton wrote: > >basename=`basename $0` > ># Allow ourself to be overridden by local changes >if [ -x /usr/local/etc/rc.d/${basename} ]; then > exec /usr/local/etc/rc.d/${basename} >fi > ># If there is a global configuration file, suck it in >if [ -r /etc/rc.conf ]; then > . /etc/rc.conf >fi > ># Check for first parameter >if [ $1x = x ]; then > echo ${basename}: No argument provided > exit 1 >fi I like your idea because I find sysV's /etc/init.d convenient. One suggestion: could you put the above boilerplate into a file that gets sourced by all the /etc/rc.d scripts (in case you want to make a global change to it)? And I dislike calling the scripts /etc/rc.d/foo.sh because (IMO) the .sh is redundant and potentially misleading if (e.g.) the sysadmin decides to rewrite them in Perl. Tony. -- 7yuc zhd2**f.a.n.finch dot@dotat.at fanf@demon.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message