Re: rcng script bugs
[ cc'ed imp@ since the second one concerns changes he recently made ] On Sat, Dec 14, 2002 at 02:24:12PM -0800, Galen Sampson wrote: 17c17 pidfile=/var/run/${name}.pid --- pidfile=/var/run/${name}/pid in order to match the default named.conf file. Yes, definitely a bug. I had changed my named.conf so I didn't notice this. However, I think your solution is just as broken as the current code. While it would work if the user doesn't change the default pid path, it wouldn't work for people who do change it (like me). I think the way to solve it is with a named_pidfile variable in defaults/rc.conf that defaults to /var/run/named/pid. What are people's thoughts on this? Secondly, the change would have to go into the 'FreeBSD' case-clause in order not to mess up the NetBSD case. /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 21; then # Interface is already up, so ignore it. continue; fi Warner, He's working off the first set of changes you made but it seems that in the diskless case you may have to reconfigure more than just lo0. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc [EMAIL PROTECTED] | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 msg48762/pgp0.pgp Description: PGP signature
Re: rcng script bugs
[ ok, really cc him this time] On Sun, Dec 15, 2002 at 01:02:51AM -0800, Mike Makonnen wrote: [ cc'ed imp@ since the second one concerns changes he recently made ] On Sat, Dec 14, 2002 at 02:24:12PM -0800, Galen Sampson wrote: 17c17 pidfile=/var/run/${name}.pid --- pidfile=/var/run/${name}/pid in order to match the default named.conf file. Yes, definitely a bug. I had changed my named.conf so I didn't notice this. However, I think your solution is just as broken as the current code. While it would work if the user doesn't change the default pid path, it wouldn't work for people who do change it (like me). I think the way to solve it is with a named_pidfile variable in defaults/rc.conf that defaults to /var/run/named/pid. What are people's thoughts on this? Secondly, the change would have to go into the 'FreeBSD' case-clause in order not to mess up the NetBSD case. /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 21; then # Interface is already up, so ignore it. continue; fi Warner, He's working off the first set of changes you made but it seems that in the diskless case you may have to reconfigure more than just lo0. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc [EMAIL PROTECTED] | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc [EMAIL PROTECTED] | Fingerprint: D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 msg48763/pgp0.pgp Description: PGP signature
rcng script bugs
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 21; 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 [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message