Date: Tue, 06 Mar 2018 21:10:33 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 226406] sysrc(8) wrong output when value is "-n" Message-ID: <bug-226406-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226406 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@FreeBSD.org Reporter: marius.h@lden.org Created attachment 191264 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D191264&action= =3Dedit 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=3D-n xyz: test -> % sysrc -f rc.conf xyz xyz: % sysrc -f rc.conf -c xyz=3D-n ; echo $? 1 % grep xyz=3D rc.conf xyz=3D"-n" Desired output: % sysrc -f rc.conf xyz=3D-n xyz: test -> -n % sysrc -f rc.conf xyz xyz: -n % sysrc -f rc.conf -c xyz=3D-n ; echo $? 0 The attached patch fixed this for me. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226406-8>