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:
parent
181560bbbf
commit
5164504a9e
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user