summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2015-05-04 19:55:28 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2015-05-04 19:55:28 +0000
commit673312bcd55905f9af8749487470081839359024 (patch)
treee64c20b577a936931851c64668bc45ec87938981 /distrib/miniroot/install.sub
parent57127e8f7bf0c20b654d8f2480b4ad30b81db45e (diff)
Add the new template file based autopartitioning feature of disklabel(8)
to the OpenBSD installer. It is available during unattended installation. The template file is fetched from an url, provided as answer to a new question in the response file: URL to autopartitioning template for disklabel = url Original diff from and OK henning@ 'no objection' krw@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub14
1 files changed, 13 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index c77003ccdbe..2d14bbdcfa2 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.835 2015/04/28 21:41:40 sthen Exp $
+# $OpenBSD: install.sub,v 1.836 2015/05/04 19:55:26 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -1671,6 +1671,18 @@ get_rootinfo() {
SWAPDEV=${ROOTDISK}b
}
+# Ask for and download autopartitioning template for disklabel.
+get_disklabel_template() {
+ local _dl=/disklabel.auto
+
+ ask "URL to autopartitioning template for disklabel?" none
+ [[ $resp == none ]] && return 1
+ echo "Fetching $resp"
+ ftp -Vo $_dl "$resp" && [[ -s $_dl ]] && return
+ echo "No autopartitioning template found."
+ exit 1
+}
+
# Start interface using the on-disk hostname.if file passed as argument $1.
# Much of this is gratuitously stolen from /etc/netstart.
ifstart () {