Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Dec 2002 14:24:12 -0800 (PST)
From:      Galen Sampson <galen_sampson@yahoo.com>
To:        current@freebsd.org
Subject:   rcng script bugs
Message-ID:  <20021214222412.99816.qmail@web14101.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021214222412.99816.qmail>