[Bug 203435] sysrc(8) does not insert newline if missing at EOF

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Sep 29 11:47:50 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203435

            Bug ID: 203435
           Summary: sysrc(8) does not insert newline if missing at EOF
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: andreas.sommer87 at googlemail.com

To reproduce:

# echo -n 'a=b' >> /etc/rc.conf
# sysrc c=d
c:  -> 
# cat /etc/rc.conf
[...]
a=bc="d"

It may happen that someone changes rc.conf without adding a newline at the end
of file. In that case, sysrc will also not behave correctly anymore. It should
ensure the newline exists when adding a new entry. Also, the output "c:  -> "
is incorrect, should be "c:  -> d".

Else the system may not come up correctly anymore because the syntax is
incorrect.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list