diff options
author | jkh <jkh@FreeBSD.org> | 1999-01-27 03:18:33 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-01-27 03:18:33 +0000 |
commit | ffb1d4de5142e36ff6ebb6d87e3379e89b3a678c (patch) | |
tree | e6fabebc2b44ca4057f0b50a8a332c88b5a31be7 | |
parent | 493df803ae17e9de75335328366e42dab3c20a3d (diff) | |
download | FreeBSD-src-ffb1d4de5142e36ff6ebb6d87e3379e89b3a678c.zip FreeBSD-src-ffb1d4de5142e36ff6ebb6d87e3379e89b3a678c.tar.gz |
Make building the kernel conditional.
-rwxr-xr-x | tools/tools/upgrade/doupgrade.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/tools/upgrade/doupgrade.sh b/tools/tools/upgrade/doupgrade.sh index df15840..67a2f62 100755 --- a/tools/tools/upgrade/doupgrade.sh +++ b/tools/tools/upgrade/doupgrade.sh @@ -25,16 +25,18 @@ if [ $PASS -eq 1 ]; then if [ ! -f ${KERN} ]; then KERN=GENERIC fi - if [ ! -f ${KERN}.bkup ]; then - cp ${KERN} ${KERN}.bkup - fi - sed -e 's/^device.*sc0.*$/ \ + if ! grep -q atkbdc0 ${KERN}; then + if [ ! -f ${KERN}.bkup ]; then + cp ${KERN} ${KERN}.bkup + fi + sed -e 's/^device.*sc0.*$/ \ controller atkbdc0 at isa? port IO_KBD tty \ device atkbd0 at isa? tty irq 1 \ device vga0 at isa? port ? conflicts \ device sc0 at isa? tty \ 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 @@ -70,9 +72,11 @@ if [ $PASS -eq 2 -a -f ${CONF} ]; then exit 1 fi fi - echo "--------------------------------------------------------------" - echo " Building an elf kernel for ${KERNEL} using the new tools" - echo "--------------------------------------------------------------" - config -r ${KERNEL} - cd ${CURDIR}/sys/compile/${KERNEL} && make -B depend -DFORCE all install + if ! file /kernel | grep -q ELF; then + echo "--------------------------------------------------------------" + echo " Building an elf kernel for ${KERNEL} using the new tools" + echo "--------------------------------------------------------------" + config -r ${KERNEL} + cd ${CURDIR}/sys/compile/${KERNEL} && make -B depend -DFORCE all install + fi fi |