[Bug 240875] usr.sbin/sysrc: If the file to be modified does not exist, an error message is displayed

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 06 Jul 2023 15:40:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240875

--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch stable/12 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=98358de5754cc85b50309323ff72a66193502107

commit 98358de5754cc85b50309323ff72a66193502107
Author:     Devin Teske <dteske@FreeBSD.org>
AuthorDate: 2019-12-02 05:24:16 +0000
Commit:     Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2023-07-06 15:39:23 +0000

    Fix spurious error from sysrc

    When using sysrc to modify a file, the file should be created silently.
    However, with the introduction of SVN r335280, an error of "No such file
    or directory" would appear despite everything else working as-expected.

    The nature of this spurious error is that SVN r335280 did not check if
    the file exists first, before trying to fixup the line-endings in the
    file just prior to modification.

    PR:             bin/240875
    Reported by:    Jose Luis Duran
    MFC after:      3 days

    (cherry picked from commit e19a2226fe3bbeeb6e922987475300868374d09a)

 usr.sbin/bsdconfig/share/sysrc.subr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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