diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-10-12 15:24:07 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-10-12 15:24:07 +0000 |
commit | e362dd20578199c4ad2a47756bb45a115ac0854e (patch) | |
tree | f07f15f670efbb83775ef455bf8eed2607522158 /usr.sbin | |
parent | 3c4620702610e1f4790c3b4f4a385098fe6d05c3 (diff) |
Better error if installurl points to a local directory.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 461bce36c02..7df57e25f8a 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.128 2017/10/12 14:48:30 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.129 2017/10/12 15:24:06 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -155,10 +155,11 @@ ls_installed() ls_missing() { - local _c _f _cmd _l="$(ls_installed)" _p _r _sha=${_TMP}/SHA256 + local _c _d _f _cmd _l="$(ls_installed)" _p _r _sha=${_TMP}/SHA256 # return inmediately if we cannot reach the mirror server - [[ -d ${_MIRROR#file://*} ]] || + [[ ${_MIRROR} == @(file://*) ]] && _d="${_MIRROR#file://*}" && + [[ -d ${_d%syspatch/*} ]] || unpriv ftp -MVo /dev/null ${_MIRROR%syspatch/*} >/dev/null set +e # manually handle unpriv() errors |