diff options
author | ajacoutot <ajacoutot@openbsd.org> | 2019-04-26 20:42:46 +0000 |
---|---|---|
committer | ajacoutot <ajacoutot@openbsd.org> | 2019-04-26 20:42:46 +0000 |
commit | 4c0afd3856c8b0a0427827ed7f8c3cd55a4e9552 (patch) | |
tree | 297b7d3c1ce07622e8515f769b9d87ac68e4e33e /usr.sbin/syspatch | |
parent | There was an extra newline in some cases and missing one in others. (diff) | |
download | wireguard-openbsd-4c0afd3856c8b0a0427827ed7f8c3cd55a4e9552.tar.xz wireguard-openbsd-4c0afd3856c8b0a0427827ed7f8c3cd55a4e9552.zip |
If we don't have a proper installurl, use cdn.openbsd.org.
Idea from sysupgrade(8).
Diffstat (limited to 'usr.sbin/syspatch')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 6f7656e4a7a..a66e4a1287e 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.144 2019/02/26 18:52:35 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.145 2019/04/26 20:42:46 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -272,7 +272,7 @@ _OSrev=${_KERNV[0]%.*}${_KERNV[0]#*.} _MIRROR=$(while read _line; do _line=${_line%%#*}; [[ -n ${_line} ]] && print -r -- "${_line}"; done </etc/installurl | tail -1) 2>/dev/null [[ ${_MIRROR} == @(file|ftp|http|https)://* ]] || - sp_err "${0##*/}: invalid URL configured in /etc/installurl" + _MIRROR=https://cdn.openbsd.org/pub/OpenBSD _MIRROR="${_MIRROR}/syspatch/${_KERNV[0]}/$(machine)" (($(sysctl -n hw.ncpufound) > 1)) && _BSDMP=true || _BSDMP=false |