3 # $NetBSD: bootconf.sh,v 1.5 2002/03/25 03:22:10 wiz Exp $
4 # $FreeBSD: src/etc/rc.d/bootconf.sh,v 1.4 2002/10/12 10:31:31 schweikh Exp $
5 # $DragonFly: src/etc/rc.d/Attic/bootconf.sh,v 1.1 2003/07/24 06:35:37 dillon Exp $
9 # REQUIRE: mountcritlocal
13 # Refer to newbtconf(8) for more information
16 if [ ! -e /etc/etc.current ]; then
19 if [ -L /etc/etc.default ]; then
20 def=`ls -ld /etc/etc.default 2>&1`
21 default="${def##*-> etc.}"
25 if [ "$default" = "current" ]; then
26 def=`ls -ld /etc/etc.current 2>&1`
27 default="${def##*-> etc.}"
31 for i in /etc/etc.*; do
32 name="${i##/etc/etc.}"
38 if [ "$name" = "$default" ]; then
39 echo -n "${spc}[${name}]"
41 echo -n "${spc}${name}"
51 while [ ! -d /etc/etc.$conf/. ]; do
52 trap "conf=$default; echo; echo Using default of $conf" ALRM
53 echo -n "Which configuration [$default] ? "
54 (sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
60 if [ ! -d /etc/etc.$conf/. ]; then
69 rm -f /etc/etc.current
70 ln -s /etc/etc.$conf /etc/etc.current
74 if [ -f /etc/rc.conf ]; then