[Bug 226406] sysrc(8) wrong output when value is "-n"
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Mar 6 21:10:34 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226406
Bug ID: 226406
Summary: sysrc(8) wrong output when value is "-n"
Product: Base System
Version: 11.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: marius.h at lden.org
Created attachment 191264
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=191264&action=edit
sysrc.patch
When the value of a variable is set to "-n" it will be printed as an empty
value.
Example output when setting a variable to be "-n":
% sysrc -f rc.conf xyz=-n
xyz: test ->
% sysrc -f rc.conf xyz
xyz:
% sysrc -f rc.conf -c xyz=-n ; echo $?
1
% grep xyz= rc.conf
xyz="-n"
Desired output:
% sysrc -f rc.conf xyz=-n
xyz: test -> -n
% sysrc -f rc.conf xyz
xyz: -n
% sysrc -f rc.conf -c xyz=-n ; echo $?
0
The attached patch fixed this for me.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list