Bug 282939 - /etc/rc.d/var_run:_var_run_save() minor bug in hardly visited code path
Summary: /etc/rc.d/var_run:_var_run_save() minor bug in hardly visited code path
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-23 22:22 UTC by Chad Jacob Milios
Modified: 2024-12-05 07:16 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Jacob Milios 2024-11-23 22:22:28 UTC
freebsd-src/libexec/rc/rc.d/var_run:30 says:
    mkdir -p ${var_run_mtree}

while it certainly meant to say:
    mkdir -p $(dirname ${var_run_mtree})

CURRENT and all supported releases have this issue

it's
line 30 on CURRENT (main),
line 27 on releng/14.2,
line 32 on releng/13.4

if anybody wants me to submit a pull request to each supported branch i will but it sure seems quick for any committer to go ahead and fix
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-11-25 17:18:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d58cf6ff905377dbca1ecf004f53133e6b57a46

commit 4d58cf6ff905377dbca1ecf004f53133e6b57a46
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-11-25 17:11:47 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-11-25 17:16:59 +0000

    rc.d/var_run: Add missing $(dirname)

    We intend to create the containing directory here. Fix this typo.

    PR:             282939
    MFC after:      3 days

 libexec/rc/rc.d/var_run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-12-04 17:10:13 UTC
A commit in branch stable/14 references this bug:

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

commit a7f33b5019353fbb689b860142672c02081f0ee1
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-11-25 17:11:47 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-12-04 17:08:27 +0000

    rc.d/var_run: Add missing $(dirname)

    We intend to create the containing directory here. Fix this typo.

    PR:             282939

    (cherry picked from commit 4d58cf6ff905377dbca1ecf004f53133e6b57a46)

 libexec/rc/rc.d/var_run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-04 17:10:15 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2904d7309b3d013b5a1d4279d7bfb32e44666dcd

commit 2904d7309b3d013b5a1d4279d7bfb32e44666dcd
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-11-25 17:11:47 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-12-04 17:09:41 +0000

    rc.d/var_run: Add missing $(dirname)

    We intend to create the containing directory here. Fix this typo.

    PR:             282939

    (cherry picked from commit 4d58cf6ff905377dbca1ecf004f53133e6b57a46)

 libexec/rc/rc.d/var_run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)