diff options
author | jkh <jkh@FreeBSD.org> | 1999-02-15 02:22:24 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-02-15 02:22:24 +0000 |
commit | 1f0aa9e3b41ba1306a69e15c929aaf32ecb10f59 (patch) | |
tree | 01ec6cb720c0553f21a3c17c706bb95ef457b951 /tools | |
parent | 0a57647424617468a9b853152f0e07dd34904187 (diff) | |
download | FreeBSD-src-1f0aa9e3b41ba1306a69e15c929aaf32ecb10f59.zip FreeBSD-src-1f0aa9e3b41ba1306a69e15c929aaf32ecb10f59.tar.gz |
Do a better job of finding the default root device.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/tools/upgrade/doupgrade.sh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/tools/upgrade/doupgrade.sh b/tools/tools/upgrade/doupgrade.sh index 67a2f62..9fa73ec 100755 --- a/tools/tools/upgrade/doupgrade.sh +++ b/tools/tools/upgrade/doupgrade.sh @@ -38,11 +38,7 @@ pseudo-device splash \ /' -e 's/sd\([0-9]\)/da\1/' -e 's/st\([0-9]\)/sa\1/' < ${KERN}.bkup > ${KERN} fi - if [ -r /dev/wd0a ]; then - ROOTDEV=wd0 - else - ROOTDEV=sd0 - fi + ROOTDEV=`awk '$2~/\/$/{print substr($1, 6, 3)}' /etc/fstab` echo -n "What is your boot device (e.g. wd0 or sd0)? [${ROOTDEV}] " read answer if [ -n "${answer}" ]; then |