sysrc(8): Send error message to stderr (not stdout)

PR:		bin/229806
Reported by:	Andreas Sommer <andreas.sommer87@googlemail.com>
MFC after:	3 days
X-MFC-to:	stable/11 stable/10 stable/9
Sponsored by:	Smule, Inc.
This commit is contained in:
Devin Teske 2018-07-16 18:53:17 +00:00
parent 4802a2cb54
commit e719942791
1 changed files with 2 additions and 1 deletions

View File

@ -874,7 +874,8 @@ while [ $# -gt 0 ]; do
*)
if ! IGNORED=$( f_sysrc_get "$NAME?" ); then
[ "$IGNORE_UNKNOWNS" -o "$QUIET" ] ||
echo "$pgm: unknown variable '$NAME'"
f_err "%s: unknown variable '%s'\n" \
"$pgm" "$NAME"
shift 1
status=$FAILURE
continue