summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sub16
1 files changed, 14 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 4b7c76c8295..0548b0bfab1 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/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>
@@ -2762,7 +2762,6 @@ __EOT
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
@@ -3182,6 +3181,7 @@ done
# 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.
@@ -3279,3 +3279,15 @@ case $MODE in
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