Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2021 18:12:50 GMT
From:      Chris Rees <crees@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ce94bedf475a - stable/13 - Create dhclient pid directory if it doesn't exist
Message-ID:  <202103021812.122ICouP078642@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by crees (doc, ports committer):

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

commit ce94bedf475ac17307be0d5cbc66a8abe0741bf6
Author:     Chris Rees <crees@FreeBSD.org>
AuthorDate: 2021-02-21 18:56:56 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2021-03-02 18:12:34 +0000

    Create dhclient pid directory if it doesn't exist
    
     - Upgrading from older FreeBSD versions can result in errors
    
     - /var/run can be a tmpfs, and this should be handled correctly
    
    Approved by:    markj
    Differential:   https://reviews.freebsd.org/D28843
    MFC after:      2 weeks
---
 libexec/rc/rc.d/dhclient | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient
index 520a0850ccbc..765e38266408 100755
--- a/libexec/rc/rc.d/dhclient
+++ b/libexec/rc/rc.d/dhclient
@@ -49,6 +49,11 @@ dhclient_prestart()
 		rc_flags="${rc_flags} -b"
 	fi
 
+
+	# /var/run/dhclient is not guaranteed to exist,
+	# e.g. if /var/run is a tmpfs
+	install -d -o root -g wheel -m 755 ${pidfile%/*}
+
 	rc_flags="${rc_flags} ${ifn}"
 }
 



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