diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-03-10 22:03:00 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-03-10 22:03:00 +0000 |
commit | 53ca44ceed1e33839d723f450e58f98347ef1e2e (patch) | |
tree | 894192243f3a10702d0e3028f127fa0d2b8872cf /distrib | |
parent | 50918cdf0212db4bd29b28be24cb68dc62aa542d (diff) |
Search case-insensitive for HTTP_SERVER in the ftplist.cgi output.
This ensures that ftp.OpenBSD.org is detected as mirror if
ftp.openbsd.org is specified as set location.
noticed by tj@
joint work with and OK tb@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sub | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 82d01628829..7fc3a825e98 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.984 2017/03/10 19:04:17 rpe Exp $ +# $OpenBSD: install.sub,v 1.985 2017/03/10 22:02:59 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -1613,7 +1613,7 @@ install_http() { # server *will* remember the specific directory info. # Format: _mirror_srv/_mirror_dir location_info # ^---- _mirror_url ----^ - set -- $(sed "/^$HTTP_SERVER/x;\$!d;x" $HTTP_LIST 2>/dev/null) + set -- $(grep -i "^$HTTP_SERVER" $HTTP_LIST 2>/dev/null | sed '$!d') _mirror_url=$1 _mirror_srv=${_mirror_url%%/*} _mirror_dir=${_mirror_url#*$_mirror_srv} |