summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-08-24 21:50:10 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-08-24 21:50:10 +0000
commit63266e8d80ad20ae82c1f52d519c8b603ae2e482 (patch)
treedb5008e950f7b4d27f778d5a212a8729a7331df0
parent60266a7278be7354aecdcc9120d960fbe81e238a (diff)
Fix automatic upgrade after fetching response file with dhcp.
When the auto upgrader tried to fetch the sets, sometimes ftp did not find any. The interface was down and had no address. As autoconf was not cleared, the upgrade's static netstart and dhcpleased both tried to configure the interface, which cannot work. Disable dhcp with "ifconfig inet -autoconf" in get_responsefile() after it is not used anymore. OK florian@
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 4 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index d09093ba37f..dfd396c686d 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1172 2021/08/09 13:56:17 sthen Exp $
+# $OpenBSD: install.sub,v 1.1173 2021/08/24 21:50:09 bluhm Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -656,7 +656,8 @@ get_responsefile() {
echo "Fetching $_url"
if unpriv ftp -Vo - "$_url" \
>"/tmp/ai/ai.$AI_MODE.conf" 2>/dev/null; then
- ifconfig $_if delete down 2>/dev/null
+ ifconfig $_if inet -autoconf delete down \
+ 2>/dev/null
rm /var/db/dhcpleased/$_if
return 0
fi
@@ -685,7 +686,7 @@ get_responsefile() {
echo "Fetching $_rf"
[[ -f $_rf ]] && _rf="file://$_rf"
if unpriv ftp -Vo - "$_rf" >"/tmp/ai/ai.$AI_MODE.conf" 2>/dev/null; then
- ifconfig $_if delete down 2>/dev/null
+ ifconfig $_if inet -autoconf delete down 2>/dev/null
return 0
fi
return 1