summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2017-05-08 09:45:14 +0000
committerajacoutot <ajacoutot@openbsd.org>2017-05-08 09:45:14 +0000
commitbd508535cbc8704ae8b79bf6727e4a694aa56cd9 (patch)
treecb258b7b5f2318f8ca2eb38079252702e3333ebd
parentUnifed PMAP_UAREA, unused since we stopped supporting ARM < v7. (diff)
downloadwireguard-openbsd-bd508535cbc8704ae8b79bf6727e4a694aa56cd9.tar.xz
wireguard-openbsd-bd508535cbc8704ae8b79bf6727e4a694aa56cd9.zip
Only test the mirror if it's remote (and not a local directory).
-rw-r--r--usr.sbin/syspatch/syspatch.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index 8b3aa32158f..9cb41f06f73 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.99 2017/05/05 08:07:36 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.100 2017/05/08 09:45:14 ajacoutot Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -186,7 +186,8 @@ ls_missing()
local _c _l="$(ls_installed)" _sha=${_TMP}/SHA256
# return inmediately if we cannot reach the mirror server
- unpriv ftp -MVo /dev/null ${_MIRROR%syspatch/*} >/dev/null
+ [[ -d ${_MIRROR#file://*} ]] ||
+ unpriv ftp -MVo /dev/null ${_MIRROR%syspatch/*} >/dev/null
# don't output anything on stdout to prevent corrupting the patch list;
# redirect stderr as well in case there's no patch available