1*433d6423SLionel Sambuc#!/bin/sh 2*433d6423SLionel Sambucset -e 3*433d6423SLionel Sambuc 4*433d6423SLionel SambucMDEC=/usr/mdec 5*433d6423SLionel SambucBOOT=/boot_monitor 6*433d6423SLionel SambucROOT=`printroot -r` 7*433d6423SLionel Sambuc 8*433d6423SLionel Sambucif [ ! -b "$ROOT" ] 9*433d6423SLionel Sambucthen 10*433d6423SLionel Sambuc echo root device $ROOT not found 11*433d6423SLionel Sambuc exit 1 12*433d6423SLionel Sambucfi 13*433d6423SLionel Sambuc 14*433d6423SLionel Sambucecho -n "Install boot as $BOOT on current root? (y/N) " 15*433d6423SLionel Sambucread ans 16*433d6423SLionel Sambuc 17*433d6423SLionel Sambucif [ ! "$ans" = y ] 18*433d6423SLionel Sambucthen 19*433d6423SLionel Sambuc echo Aborting. 20*433d6423SLionel Sambuc exit 1 21*433d6423SLionel Sambucfi 22*433d6423SLionel Sambuc 23*433d6423SLionel Sambucecho "Installing boot monitor into $BOOT." 24*433d6423SLionel Sambuccp $MDEC/boot_monitor $BOOT 25*433d6423SLionel Sambuc 26*433d6423SLionel Sambucdisk=`echo "$ROOT" | sed 's/s[0-3]//'` 27*433d6423SLionel Sambucecho -n "Install bootxx_minixfs3 into $disk? (y/N) " 28*433d6423SLionel Sambucread ans 29*433d6423SLionel Sambuc 30*433d6423SLionel Sambucif [ ! "$ans" = y ] 31*433d6423SLionel Sambucthen 32*433d6423SLionel Sambuc echo Exiting... 33*433d6423SLionel Sambuc sync 34*433d6423SLionel Sambuc exit 0 35*433d6423SLionel Sambucfi 36*433d6423SLionel Sambuc 37*433d6423SLionel Sambucecho "Installing bootxx_minixfs3 into $disk." 38*433d6423SLionel Sambucinstallboot_nbsd "$disk" "$MDEC/bootxx_minixfs3" 39*433d6423SLionel Sambuc 40*433d6423SLionel Sambucsync 41