Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2020 13:15:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 247562] dhclient: service script does not create missing piddir
Message-ID:  <bug-247562-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

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

            Bug ID: 247562
           Summary: dhclient: service script does not create missing
                    piddir
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: walter.von.entferndt@posteo.net

Created attachment 215957
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=215957&action=edit
patch for /etc/rc.d/dhclient (FreeBSD-12.1-RELEASE)

I consider it good practice to have /var/run on a small tmpfs.  The side effect
is that this is empty after every reboot.  The advantage is that this unveils
bugs otherwise undetected.

Like some port's service scripts, dhclient's /etc/rc.d/dhclient does not check
for the existence of it's piddir, and fails to work correctly if it does not
exist.

Many users who run into this bug will create the missing directory manually and
not report it...

Suggestion:
1. since I encountered this kind of bug from time to time, I'd like to suggest
to add to rc.subr the functionality to create $required_dirs and set
$xxx_dir_mode and $xxx_dir_owner (should understand owner:group syntax).
2. /etc/rc should check /var on startup against the mtree file and create
missing directories.

The patch appended is against 12.1-RELEASE, and was produced with "patch -U 7"
from the root directory.

Thx.

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

home | help

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