From owner-cvs-all Mon Sep 24 10:45:51 2001 Delivered-To: cvs-all@freebsd.org Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by hub.freebsd.org (Postfix) with ESMTP id 474FB37B41E for ; Mon, 24 Sep 2001 10:45:40 -0700 (PDT) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailb.telia.com (8.11.6/8.11.6) with ESMTP id f8OHjZD11853 for ; Mon, 24 Sep 2001 19:45:35 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id TAA21775 for ; Mon, 24 Sep 2001 19:45:34 +0200 (CEST) Received: (qmail 16717 invoked by uid 1001); 24 Sep 2001 17:45:32 -0000 Date: Mon, 24 Sep 2001 19:45:31 +0200 From: Erik Trulsson To: "David O'Brien" Cc: Andrea Campi , Hajimu UMEMOTO , cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/etc rc Message-ID: <20010924194531.A16692@student.uu.se> Mail-Followup-To: David O'Brien , Andrea Campi , Hajimu UMEMOTO , cvs-committers@freebsd.org, cvs-all@freebsd.org References: <200109240303.f8O33qB64939@freefall.freebsd.org> <20010924175857.A21878@webcom.it> <20010925.015110.21914758.ume@mahoroba.org> <20010924192019.A22181@webcom.it> <20010924103456.C9322@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010924103456.C9322@dragon.nuxi.com> User-Agent: Mutt/1.3.22.1i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 24, 2001 at 10:34:56AM -0700, David O'Brien wrote: > On Mon, Sep 24, 2001 at 07:20:19PM +0200, Andrea Campi wrote: > > I am not opposing this patch, just asking for the reasoning behind it, warning > > that it may break POLA, and asking for at least an UPDATING entry and/or no > > MFC. > > For me it was a POLA that after I did ``vi /usr/local/etc/rc.d/foo.sh'' > the script barfed with "Bad interpreter" on the next reboot. It took me a > while to realize what in the world was wrong. /etc/rc uses `sh' to run > ${diskless_mount}, /etc/rc.devfs, and /etc/rc.local (which > /usr/local/etc/rc.d/ is the 2nd generation of). > > Also note that explicitly /usr/local/etc/rc.d/*.sh is run, not `*', but > `*.sh'. This is so that you can move scripts out of the way. The fact > that `chmod -x' worked, was just an unforeseen side affect. The rc(8) manpage says that: Scripts are only executed if their basename(1) matches the shell globbing pattern *.sh, and they are executable. Any other files or directories present within the directory are silently ignored. So the 'chmod -x' way is actually documented to work. If the change is kept then the documentation needs to be changed too to reflect the new reality. (And an entry in UPDATING would probably be a very good idea.) -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message