sysrc.subr: Fix display when value is "-n"

PR:		bin/226406
Reported by:	Marius Halden <marius.halden@modirum.com>
MFC after:	1 week
X-MFC-to:	stable/11
Sponsored by:	Smule, Inc.
This commit is contained in:
Devin Teske 2018-06-17 06:25:32 +00:00
parent 181560bbbf
commit 5164504a9e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335281

View File

@ -200,7 +200,7 @@ f_sysrc_get()
# such as "${varname?}" and "${varname:?}" (see "Parameter
# Expansion" in sh(1) for more information).
#
eval echo '"${'"$1"'}"' 2> /dev/null
eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null
)
}
@ -338,7 +338,7 @@ f_sysrc_get_default()
# such as "${varname?}" and "${varname:?}" (see "Parameter
# Expansion" in sh(1) for more information).
#
eval echo '"${'"$1"'}"' 2> /dev/null
eval printf "'%s\\n'" '"${'"$1"'}"' 2> /dev/null
)
}