summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2016-01-24 09:13:58 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2016-01-24 09:13:58 +0000
commit3fa03a2c2f8ff6f131c3041d1bf490b0b99e6b65 (patch)
tree164343e736fea3178c42a92e721bcf812a724792
parent3c1397cfd8659ac429171371e7ad519982cd466b (diff)
- cleanup quoting in sed pattern
- use shell built-in read command instead of 'sed q' OK krw@, halex@
-rw-r--r--distrib/miniroot/install.sub10
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index d85eda65dd4..ab269fe579a 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.872 2016/01/17 18:01:31 rpe Exp $
+# $OpenBSD: install.sub,v 1.873 2016/01/24 09:13:57 rpe Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -66,15 +66,15 @@ usage() {
# Wait for the ftp process to finish, or be killed after the timeout.
waitcgiinfo() {
- local _key _val
+ local _l _key _val
wait "$CGIPID" 2>/dev/null
[[ -s $CGI_INFO ]] || return
- sed -n "s,^http://"'\([[A-Za-z0-9\:_][]A-Za-z0-9:._-]*\),\1,p' \
+ sed -n 's,^http://\([[A-Za-z0-9\:_][]A-Za-z0-9:._-]*\),\1,p' \
$CGI_INFO >$HTTP_LIST 2>/dev/null
- set -- $(sed q $HTTP_LIST)
- : ${HTTP_SERVER:=${1%%/*}}
+ read -r -- _l <$HTTP_LIST
+ : ${HTTP_SERVER:=${_l%%/*}}
while IFS='=' read -r -- _key _val; do
case $_key=$_val in