summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-07-09 03:12:25 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-07-09 03:12:25 +0000
commit817114c5d5ee06b394eb91c228e15dc3c663d084 (patch)
tree8651acd34ea3ccaa3e4df56221bdec7156d34495 /distrib/miniroot/install.sub
parent78d2549fcc7ccef17705243f56b8c0c8ef1cc341 (diff)
Unbreak sysmerge(8) with 'disk' install media.
reported by and ok krw@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub17
1 files changed, 12 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 4b0460c0fd5..c1e580b7af3 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.643 2011/07/09 01:20:37 halex Exp $
+# $OpenBSD: install.sub,v 1.644 2011/07/09 03:12:24 ajacoutot Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -1170,9 +1170,9 @@ install_files() {
# save arguments for sysmerge(8)
[[ $_f == base$VERSION.tgz ]] && \
- SM_ARGS="-s $_src/etc$VERSION.tgz"
+ SM_ETC="$_src/etc$VERSION.tgz"
[[ $_f == xbase$VERSION.tgz ]] && \
- SM_ARGSX="-x $_src/xetc$VERSION.tgz"
+ SM_XETC="$_src/xetc$VERSION.tgz"
done
}
@@ -1631,10 +1631,17 @@ install_sets() {
}
run_sysmerge() {
- if [[ -n "$SM_ARGS" || -n "$SM_ARGSX" ]]; then
+ if [[ -n "$SM_ETC" || -n "$SM_XETC" ]]; then
ask_yn "Merge the new etc/xetc install sets using sysmerge(8)?" no
- [[ $resp == y ]] && \
+ if [[ $resp == y ]]; then \
+ [[ X"$SM_ETC" != X"" ]] && \
+ ftp $FTPOPTS -o /mnt/tmp/etc$VERSION.tgz -m "$SM_ETC" && \
+ SM_ARGS="-s /tmp/etc$VERSION.tgz"
+ [[ X"$SM_XETC" != X"" ]] && \
+ ftp $FTPOPTS -o /mnt/tmp/xetc$VERSION.tgz -m "$SM_XETC" && \
+ SM_ARGSX="-x /tmp/xetc$VERSION.tgz"
/mnt/usr/sbin/chroot /mnt /usr/sbin/sysmerge $SM_ARGS $SM_ARGSX
+ fi
fi
}