Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2015 11:47:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 203435] sysrc(8) does not insert newline if missing at EOF
Message-ID:  <bug-203435-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: andreas.sommer87@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203435-8>