From owner-dev-commits-src-all@freebsd.org Tue Mar 2 19:16:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D78254D3C4; Tue, 2 Mar 2021 19:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqn1037jMz3Dc7; Tue, 2 Mar 2021 19:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59D511BDD7; Tue, 2 Mar 2021 19:16:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122JGKnI059467; Tue, 2 Mar 2021 19:16:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122JGKDv059466; Tue, 2 Mar 2021 19:16:20 GMT (envelope-from git) Date: Tue, 2 Mar 2021 19:16:20 GMT Message-Id: <202103021916.122JGKDv059466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chris Rees Subject: git: 945184b92f65 - releng/13.0 - Create dhclient pid directory if it doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 945184b92f654e50692a42e58b477f9c473b948d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 19:16:20 -0000 The branch releng/13.0 has been updated by crees (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=945184b92f654e50692a42e58b477f9c473b948d commit 945184b92f654e50692a42e58b477f9c473b948d Author: Chris Rees AuthorDate: 2021-02-21 18:56:56 +0000 Commit: Chris Rees CommitDate: 2021-03-02 19:16:06 +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: re (gjb) Approved by: markj Differential: https://reviews.freebsd.org/D28843 MFC after: 2 weeks (cherry picked from commit ce94bedf475ac17307be0d5cbc66a8abe0741bf6) --- 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}" }