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/bootconf,v 1.1 2007/08/12 14:37:48 swildner Exp $
10 # BEFORE: mountcritlocal
16 # Refer to newbtconf(8) for more information
19 if [ ! -e /etc
/etc.current
]; then
22 if [ -L /etc
/etc.default
]; then
23 def
=`ls -ld /etc/etc.default 2>&1`
24 default
="${def##*-> etc.}"
28 if [ "$default" = "current" ]; then
29 def
=`ls -ld /etc/etc.current 2>&1`
30 default
="${def##*-> etc.}"
34 for i
in /etc
/etc.
*; do
35 name
="${i##/etc/etc.}"
41 if [ "$name" = "$default" ]; then
42 echo -n "${spc}[${name}]"
44 echo -n "${spc}${name}"
54 while [ ! -d /etc
/etc.
$conf/.
]; do
55 trap "conf=$default; echo; echo Using default of $conf" ALRM
56 echo -n "Which configuration [$default] ? "
57 (sleep 30 && kill -ALRM $master) >/dev
/null
2>&1 &
63 if [ ! -d /etc
/etc.
$conf/.
]; then
72 rm -f /etc
/etc.current
73 ln -s /etc
/etc.
$conf /etc
/etc.current
77 if [ -f /etc
/rc.conf
]; then
88 dummy_rc_command
$1 XXX