Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 2019 15:02:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 240875] usr.sbin/sysrc: If the file to be modified does not exist, an error message is displayed
Message-ID:  <bug-240875-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

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

            Bug ID: 240875
           Summary: usr.sbin/sysrc: If the file to be modified does not
                    exist, an error message is displayed
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: jlduran@gmail.com

Created attachment 207890
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=207890&action=edit
sysrc.subr patch obtained from
https://github.com/freebsd/poudriere/pull/708#issuecomment-526753174

Currently, with sysrc, if the file to be modified does not exist, an error
message is displayed.

In this case, there is no /etc/rc.conf:

    root@test:~ # sysrc hostname="test.example.com"
    awk: can't open file /etc/rc.conf
     source line number 1
    hostname:  -> test.example.com

The patch fixes this situation.

This patch was created by @dteske, obtained from
https://github.com/freebsd/poudriere/pull/708#issuecomment-526753174

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

help

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