From nobody Wed Feb 8 07:54:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBXMM41znz3ks5t; Wed, 8 Feb 2023 07:54:23 +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 4PBXMM1D26z3jZJ; Wed, 8 Feb 2023 07:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675842863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1jmn7y3f4/3qYeY3d8Telc20Hxv1VJ7TuS4OVzDz35k=; b=H8DK9R/V2/Kx/yu6vZSkvCL1/ecr2J61Xi6VcuxH5kVeS/UlVbpFXb4n9nCkHNBegZVt0e 3x5p3twj2WbtCSz1NeOkPeKPm4IDBdtOJZomu7mNIuyj8jQyXFpbpJPkBxPA60oi4xV1e5 cMVd/5U4ZZRdMVWMB7vvDORYxxe7zBf5G2NiUXwtmdMb2HO27pkAcrCo+9skSg2d0+WZFe Oa1R4a9wP/cybyN2UYAkz9mZQAZYmYakVps1+JEA+u33L/4fUnbc9++sMCaF7aZbOSMujy z3mWtAnkA+ZeWzdlubf905FCStY6zfS5jX9cb4qsqSVQcvpDBlXGCJzemPtRTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675842863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1jmn7y3f4/3qYeY3d8Telc20Hxv1VJ7TuS4OVzDz35k=; b=ndfH6gjQ+682OXf+f70WWKtSwtW0st9Zpqzwk929GtNfaF5PAq7HaVMORlnXRVWbbINk55 sVra0Yvtc8PrmYV4sjREtRBRdEl36Rx1Z8LMQ6q7y7OTkkEcTJ2rRe6C1BT8QuqixQfBF8 un7xk9o1BKg2zFNU+0/D1bfcs+SwIcL9mfS0UTor2RhmQoEp8ZFnXi3NhlPTeUksrZbPDA asuIFYHcOoXVmgenAQak01nHj8isdwwA28LaMAlvro0Byb2rnPDpfM/xr/jHnafmIZExdw /hioZCteDHslqwsvZOjy2EbtvOolCHkpjyDmQssY1p2WygHsO3D+DmsAOcrtFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675842863; a=rsa-sha256; cv=none; b=VQJTPD/HZEo92Xk1Z41NKmeBBBGDUmy//m8fD0lxH8S+9D3TCI5bW9qBIfefBcUkwSoijW VZetP0mtRgeD/O2omiz+442wUV7I3o9jxtcUPz5WJNnLpdFi5FAT0f0qphwga7G+zX44tU 4tR5x2PlIPnGpjQqeQpYU5kwH0UhUW1gXlhQJgZqIGw1F6PR96wrM6aTgov4aRwCPfk7Ts aiG0W80ApxWU8yOr1o/bw8NViAm1dHTpsviKvfrBMxm8BgaqqNCtDhG3Yapfz4zvTCM9Q1 RJ75az/W1XTvFjmQHP4AQPNI7oBKXBpnIxEYjV5gQOJu4TrLM4+dubWcxxF1ng== 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 4PBXMM0KVgzpXb; Wed, 8 Feb 2023 07:54:23 +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 3187sMS6038222; Wed, 8 Feb 2023 07:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3187sMHf038221; Wed, 8 Feb 2023 07:54:22 GMT (envelope-from git) Date: Wed, 8 Feb 2023 07:54:22 GMT Message-Id: <202302080754.3187sMHf038221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: f4d9116de1da - main - devd: Move dhclient part in devd/dhclient.conf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4d9116de1dadc26d35302e1c5eb125e7de30db1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d9116de1dadc26d35302e1c5eb125e7de30db1 commit f4d9116de1dadc26d35302e1c5eb125e7de30db1 Author: Emmanuel Vadot AuthorDate: 2023-02-01 07:41:56 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-08 07:51:20 +0000 devd: Move dhclient part in devd/dhclient.conf And make it part of the FreeBSD-dhclient package. This avoid calling dhclient on an installation without dhclient installed. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38322 --- sbin/devd/Makefile | 5 +++++ sbin/devd/devd.conf | 19 ------------------- sbin/devd/dhclient.conf | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index 618dd032656b..c9d2470f30b5 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -12,6 +12,11 @@ DEVDDIR= /etc/devd DEVD+= asus.conf .endif +CONFGROUPS+= DHCLIENT +DHCLIENTDIR= ${DEVDDIR} +DHCLIENT+= dhclient.conf +DHCLIENTPACKAGE= dhclient + .if ${MK_HYPERV} != "no" CONFGROUPS+= HYPERV HYPERVDIR=${DEVDDIR} diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf index 15b37ee8fd90..f7a8ea7ac8aa 100644 --- a/sbin/devd/devd.conf +++ b/sbin/devd/devd.conf @@ -44,19 +44,6 @@ notify 0 { action "/etc/pccard_ether $subsystem start"; }; -# -# Try to start dhclient on Ethernet-like interfaces when the link comes -# up. Only devices that are configured to support DHCP will actually -# run it. No link down rule exists because dhclient automatically exits -# when the link goes down. -# -notify 0 { - match "system" "IFNET"; - match "type" "LINK_UP"; - media-type "ethernet"; - action "service dhclient quietstart $subsystem"; -}; - # # Like Ethernet devices, but separate because 802.11 require spawning # wlan(4) interface. @@ -69,12 +56,6 @@ detach 0 { device-name "$wifi-driver-regex"; action "/etc/pccard_ether $device-name stopchildren"; }; -notify 0 { - match "system" "IFNET"; - match "type" "LINK_UP"; - media-type "802.11"; - action "service dhclient quietstart $subsystem"; -}; # An entry like this might be in a different file, but is included here # as an example of how to override things. Normally 'ed50' would match diff --git a/sbin/devd/dhclient.conf b/sbin/devd/dhclient.conf new file mode 100644 index 000000000000..e90558295e1a --- /dev/null +++ b/sbin/devd/dhclient.conf @@ -0,0 +1,19 @@ +# +# Try to start dhclient on Ethernet-like interfaces when the link comes +# up. Only devices that are configured to support DHCP will actually +# run it. No link down rule exists because dhclient automatically exits +# when the link goes down. +# +notify 0 { + match "system" "IFNET"; + match "type" "LINK_UP"; + media-type "ethernet"; + action "service dhclient quietstart $subsystem"; +}; + +notify 0 { + match "system" "IFNET"; + match "type" "LINK_UP"; + media-type "802.11"; + action "service dhclient quietstart $subsystem"; +};