From owner-freebsd-current Sat Dec 14 14:24:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA5FD37B401 for ; Sat, 14 Dec 2002 14:24:13 -0800 (PST) Received: from web14101.mail.yahoo.com (web14101.mail.yahoo.com [216.136.172.131]) by mx1.FreeBSD.org (Postfix) with SMTP id 90A1743EA9 for ; Sat, 14 Dec 2002 14:24:13 -0800 (PST) (envelope-from galen_sampson@yahoo.com) Message-ID: <20021214222412.99816.qmail@web14101.mail.yahoo.com> Received: from [165.247.219.105] by web14101.mail.yahoo.com via HTTP; Sat, 14 Dec 2002 14:24:12 PST Date: Sat, 14 Dec 2002 14:24:12 -0800 (PST) From: Galen Sampson Subject: rcng script bugs To: current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello all, I recently decided that it would be a good idea to set up a diskless workstation at home. While I was working on setting it up I ran into numerous problems with the rc scripts, particularly chick-and-egg type mounting problems. However I also noticed some problems with scripts that are important to everyone, not just diskless users. /etc/rc.d/named: The pid file used by the rc script uses the file /var/run/named.pid for use in reloading, restarting, etc. The default named.conf file in /etc/namedb contains explicitly sets the pid file to /var/run/named/pid. I assume that the reason FreeBSD puts the pid file in /var/run/named instead of just /var/run is because of permissions (the default rc configuration starts named with '-u bind -g bind') and thus could not write to /var/run. I propose the following change to /etc/rc.d/named 17c17 < pidfile="/var/run/${name}.pid" --- > pidfile="/var/run/${name}/pid" in order to match the default named.conf file. /etc/rc.d/network1: When using a diskless configuration this file took the interface offline, preventing the machine from booting. I noticed that a change has been added to check if an interface is up and skip configuring it if it is. Instead of using grep it is possible to use ifconfig's -d option (see man page) to only list interfaces marked as down. This is my change for /etc/rc.d/network1 140c140 < network_interfaces="`ifconfig -l -d`" --- > network_interfaces="`ifconfig -l`" 148a149,153 > if ifconfig ${ifn} | grep -s UP, > /dev/null 2>&1; then > # Interface is already up, so ignore it. > continue; > fi > Hope this helps someone. regards, Galen Sampson __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message