1#!/bin/sh
2set -e
3
4MDEC=/usr/mdec
5BOOT=/boot_monitor
6ROOT=`printroot -r`
7
8if [ ! -b "$ROOT" ]
9then
10	echo root device $ROOT not found
11	exit 1
12fi
13
14echo -n "Install boot as $BOOT on current root? (y/N) "
15read ans
16
17if [ ! "$ans" = y ]
18then
19	echo Aborting.
20	exit 1
21fi
22
23echo "Installing boot monitor into $BOOT."
24cp $MDEC/boot_monitor $BOOT
25
26disk=`echo "$ROOT" | sed 's/s[0-3]//'`
27echo -n "Install bootxx_minixfs3 into $disk? (y/N) "
28read ans
29
30if [ ! "$ans" = y ]
31then
32	echo Exiting...
33	sync
34	exit 0
35fi
36
37echo "Installing bootxx_minixfs3 into $disk."
38installboot_nbsd "$disk" "$MDEC/bootxx_minixfs3"
39
40sync
41