git: f4d9116de1da - main - devd: Move dhclient part in devd/dhclient.conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Feb 2023 07:54:22 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=f4d9116de1dadc26d35302e1c5eb125e7de30db1
commit f4d9116de1dadc26d35302e1c5eb125e7de30db1
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-02-01 07:41:56 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
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";
+};