Subject: bin/14603: /sbin/newbtconf can re-init
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 11/16/2001 07:33:48
>Synopsis: /sbin/newbtconf can re-init
>Arrival-Date: Fri Nov 16 07:35:00 PST 2001
>Originator: Robby Griffin
NetBSD foiegras 1.5.2 NetBSD 1.5.2 (TERC_NETWORK_SERVER) #1: Fri Oct 19 20:09:52 EDT 2001 root@foiegras:/usr/src/sys/arch/i386/compile/TERC_NETWORK_SERVER i386
/sbin/newbtconf is a shell script for initializing new boot configurations. When you run it with the "init" argument, it creates the directory /etc/etc.network and moves some config files in there, points the symlink /etc/etc.current at /etc/etc.network, and replaces the config files with symlinks to /etc/etc.current/foo. It's not supposed to redo this initialization when you run it with "init" again, but there's a typo in the script.
In particular, if you've gone on to create other boot configurations and deleted /etc/etc.network, the script will fail to detect that /etc/etc.current still exists, because it looks for /etc/etc/current by mistake.
This is a minor bug since the effect is to create a bogus /etc/etc.network filled with invalid symlinks instead of config files, and your real config files are still present in /etc/etc.<previousconfig>, but it would have the effect of changing the current config to the bogus etc.network at runtime; thus turning off DNS resolution and so forth.
/sbin/newbtconf mynewconfig network
# (reboot, select mynewconfig at bootconf.sh prompt)
rm -rf /etc/etc.network
--- newbtconf.orig Wed Aug 23 08:40:05 2000
+++ newbtconf Fri Nov 16 10:30:13 2001
@@ -14,7 +14,7 @@
rc.conf rc.conf.d resolv.conf"
if [ $dir = init ] ; then
- if [ -d /etc/etc.network -o -e /etc/etc/current ] ; then
+ if [ -d /etc/etc.network -o -e /etc/etc.current ] ; then
echo "Error: multi-configuration already initialized"