summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2013-11-13 19:17:23 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2013-11-13 19:17:23 +0000
commitedb5cd3aa2d9d541a4e083f0a637e4306a8cdd66 (patch)
tree1cf50406a5f9170cce01937ed4a3466b0c20682b /distrib/miniroot/install.sub
parent37e7f01fc4af43723f3914c8eb68170d310ab3d1 (diff)
Ignore empty lines and emtpy answers in install.conf.
bug report from philip e1c1bac6253dc54a1e89ddc046585792 at posteo dot net ok halex@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub5
1 files changed, 3 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index bb28cf4edd9..0e0365d95b4 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.694 2013/11/13 07:16:55 rpe Exp $
+# $OpenBSD: install.sub,v 1.695 2013/11/13 19:17:22 rpe 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
@@ -284,7 +284,8 @@ _autorespond() {
while IFS== read _key _value; do
_key=${_key##+( | ])} _value=${_value##+( | )}
_key=${_key%%+( | ])} _value=${_value%%+( | )}
- [[ $_q == *"$_key"* ]] && resp=$_value && let _i++
+ [[ $_q == *"$_key"* && -n $_value ]] &&
+ resp=$_value && let _i++
done < $RESPONSEFILE
(( _i == 1 )) && return
(( !_i )) && [[ -n $_def ]] && resp=$_def && return