summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/bootconf.sh
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
committergordon <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
commit9c5433cb225f7a4e56e87623ea2e4011179553a5 (patch)
tree3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/bootconf.sh
parent50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (diff)
downloadFreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.zip
FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.tar.gz
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
Diffstat (limited to 'etc/rc.d/bootconf.sh')
-rwxr-xr-xetc/rc.d/bootconf.sh27
1 files changed, 20 insertions, 7 deletions
diff --git a/etc/rc.d/bootconf.sh b/etc/rc.d/bootconf.sh
index 8f663ca..1fdc201 100755
--- a/etc/rc.d/bootconf.sh
+++ b/etc/rc.d/bootconf.sh
@@ -1,6 +1,7 @@
#!/bin/sh
#
-# $NetBSD: bootconf.sh,v 1.2 2000/08/21 23:34:45 lukem Exp $
+# $NetBSD: bootconf.sh,v 1.5 2002/03/25 03:22:10 wiz Exp $
+# $FreeBSD$
#
# PROVIDE: bootconf
@@ -20,9 +21,13 @@ bootconf_start()
else
default=current
fi
+ if [ "$default" = "current" ]; then
+ def=`ls -ld /etc/etc.current 2>&1`
+ default="${def##*-> etc.}"
+ fi
+
spc=""
- for i in /etc/etc.*
- do
+ for i in /etc/etc.*; do
name="${i##/etc/etc.}"
case $name in
current|default|\*)
@@ -43,11 +48,11 @@ bootconf_start()
_DUMMY=/etc/passwd
conf=${_DUMMY}
while [ ! -d /etc/etc.$conf/. ]; do
- trap "conf=$default; echo; echo Using default of $conf" 14
+ trap "conf=$default; echo; echo Using default of $conf" ALRM
echo -n "Which configuration [$default] ? "
(sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
read conf
- trap : 14
+ trap : ALRM
if [ -z $conf ] ; then
conf=$default
fi
@@ -55,8 +60,16 @@ bootconf_start()
conf=${_DUMMY}
fi
done
- rm -f /etc/etc.current
- ln -s /etc/etc.$conf /etc/etc.current
+
+ case $conf in
+ current|default)
+ ;;
+ *)
+ rm -f /etc/etc.current
+ ln -s /etc/etc.$conf /etc/etc.current
+ ;;
+ esac
+
if [ -f /etc/rc.conf ] ; then
. /etc/rc.conf
fi
OpenPOWER on IntegriCloud