Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/stand/binstall Allow second-stage boot progra...



details:   https://anonhg.NetBSD.org/src/rev/d63c90803681
branches:  trunk
changeset: 482139:d63c90803681
user:      pk <pk%NetBSD.org@localhost>
date:      Tue Feb 15 16:15:07 2000 +0000

description:
Allow second-stage boot program to be specified on the command line.

diffstat:

 sys/arch/sparc/stand/binstall/binstall.sh |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (50 lines):

diff -r 50d4115d2ba8 -r d63c90803681 sys/arch/sparc/stand/binstall/binstall.sh
--- a/sys/arch/sparc/stand/binstall/binstall.sh Tue Feb 15 14:09:59 2000 +0000
+++ b/sys/arch/sparc/stand/binstall/binstall.sh Tue Feb 15 16:15:07 2000 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: binstall.sh,v 1.3 1999/03/01 01:05:51 kim Exp $
+#      $NetBSD: binstall.sh,v 1.4 2000/02/15 16:15:07 pk Exp $
 #
 
 vecho () {
@@ -24,6 +24,7 @@
        echo "the appropriate filesystem partition."
        echo "Options:"
        echo "  -h              - display this message"
+       echo "  -b<bootprog>    - second-stage boot program to install"
        echo "  -m<path>        - Look for boot programs in <path> (default: /usr/mdec)"
        echo "  -v              - verbose mode"
        echo "  -t              - test mode (implies -v)"
@@ -38,12 +39,13 @@
 
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 MDEC=${MDEC:-/usr/mdec}
+BOOTPROG=${BOOTPROG:-boot}
 
 if [ "`sysctl -n kern.securelevel`" -gt 0 ]; then
        Secure
 fi
 
-set -- `getopt "hm:tv" "$@"`
+set -- `getopt "b:hm:tv" "$@"`
 if [ $? -gt 0 ]; then
        Usage
 fi
@@ -52,6 +54,7 @@
 do
        case $1 in
        -h) Help; shift ;;
+       -b) BOOTPROG=$2; shift 2 ;;
        -m) MDEC=$2; shift 2 ;;
        -t) TEST=1; VERBOSE=1; shift ;;
        -v) VERBOSE=1; shift ;;
@@ -100,7 +103,7 @@
        TARGET=$DEST/boot
        vecho Boot device: $DEV
        vecho Target: $TARGET
-       $DOIT dd if=${MDEC}/boot of=$TARGET bs=32 skip=$SKIP
+       $DOIT dd if=${MDEC}/${BOOTPROG} of=$TARGET bs=32 skip=$SKIP
        sync; sync; sync
        vecho ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV
        $DOIT ${MDEC}/installboot ${VERBOSE:+-v} $TARGET ${MDEC}/bootxx $DEV



Home | Main Index | Thread Index | Old Index