summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-05-23 13:08:29 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-05-23 13:08:29 +0000
commit7e106f6c620e73373b9bea44a1a92dac95f4ecb8 (patch)
treefb89f4b49f5c28f74e46f58863248ac358cd8392
parentb35eb47305f6a8dc78d7f75b8020e5707c6fb5ea (diff)
Hide sh(1) error message when /etc/installurl does not exist; we already
error out with a message in this case since _MIRROR is empty. reported by tedu@
-rw-r--r--usr.sbin/syspatch/syspatch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index d177746048f..b355d5369db 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.105 2017/05/23 12:05:53 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.106 2017/05/23 13:08:28 ajacoutot Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -287,7 +287,7 @@ _OSrev=${_KERNV[0]%.*}${_KERNV[0]#*.}
[[ -n ${_OSrev} ]]
_MIRROR=$(while read _line; do _line=${_line%%#*}; [[ -n ${_line} ]] &&
- print -r -- "${_line}"; done </etc/installurl | tail -1)
+ print -r -- "${_line}"; done </etc/installurl | tail -1) 2>/dev/null
[[ ${_MIRROR} == @(file|http|https)://*/*[!/] ]] ||
sp_err "${0##*/}: invalid URL configured in /etc/installurl"