#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1046 2017/12/17 17:03:52 rpe Exp $
+# $OpenBSD: install.sub,v 1.1047 2017/12/17 18:29:56 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
cat <<__EOT
CONGRATULATIONS! Your OpenBSD $MODE has been successfully completed!
-To boot the new system, enter 'reboot' at the command prompt.
__EOT
[[ $MODE == install ]] && cat <<__EOT
When you login to your new system the first time, please read your mail
# MDXDM - ask if xdm should be started if set to 'y'
# NCPU - the number of cpus for mp capable arches
# MDKERNEL - the name of the boot kernel
+# MDREBOOT - the command to either reboot or halt the system
. install.md
# Start listener process looking for dmesg changes.
install) do_install;;
upgrade) do_upgrade;;
esac
+
+# In case of autoinstall, this is a second process of install.sub.
+# Exiting here returns to the original process, which handles the
+# automatic reboot in do_autoinstall().
+$AUTO && exit
+
+if ask_yn "Escape to shell before reboot?"; then
+ echo "To boot the new system, enter 'reboot' at the command prompt."
+ # Fall through to .profile which leaves us at the command prompt.
+else
+ exec "${MDREBOOT:-reboot}"
+fi
-# $OpenBSD: install.md,v 1.49 2017/07/28 18:15:44 rpe Exp $
+# $OpenBSD: install.md,v 1.50 2017/12/17 18:29:56 rpe Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# machine dependent section of installation/upgrade script.
#
+MDREBOOT=halt
MDTERM=sun
MDXAPERTURE=1
MDXDM=y