Allow for an optional MD upgrade preparation routine.
This commit is contained in:
parent
ddbba91107
commit
d4ed4966be
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: upgrade.sh,v 1.19 1999/11/02 06:11:25 sjg Exp $
|
||||
# $NetBSD: upgrade.sh,v 1.20 2000/11/17 17:36:39 pk Exp $
|
||||
#
|
||||
# Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -58,6 +58,11 @@ MODE="upgrade"
|
|||
# md_welcome_banner() - display friendly message
|
||||
# md_not_going_to_install() - display friendly message
|
||||
# md_congrats() - display friendly message
|
||||
# md_set_term - set terminal type
|
||||
# md_makerootwritable - what it says
|
||||
# optional:
|
||||
# md_upgrade_prep_needed - variable: set if you md_prepare_upgrade()
|
||||
# md_prepare_upgrade - any machine dependent preparations
|
||||
|
||||
# we need to make sure .'s below work if this directory is not in $PATH
|
||||
# dirname may not be available but expr is
|
||||
|
@ -282,6 +287,26 @@ check_fs /tmp/fstab.shadow
|
|||
# Mount filesystems.
|
||||
mount_fs /tmp/fstab.shadow
|
||||
|
||||
# Machine dependent preparation.
|
||||
test "$md_upgrade_prep_needed" && {
|
||||
md_prepare_upgrade || {
|
||||
cat << 'EOF'
|
||||
The preparations for upgrading your machine did not complete successfully.
|
||||
|
||||
EOF
|
||||
echo -n "Continue anyway? [n]"
|
||||
getresp "n"
|
||||
case "$resp" in
|
||||
y*|Y*)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo -n "Are the upgrade sets on one of your normally mounted (local) filesystems? [y] "
|
||||
getresp "y"
|
||||
case "$resp" in
|
||||
|
|
Loading…
Reference in New Issue