aboutsummaryrefslogtreecommitdiff
path: root/sbin/devd
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2023-02-01 07:41:56 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2023-02-08 07:51:20 +0000
commitf4d9116de1dadc26d35302e1c5eb125e7de30db1 (patch)
treea56c170ad9fab5173bd9670900505a2252b79c41 /sbin/devd
parent431b9b6692f543968dad2eca14420cf72ebb78e8 (diff)
Diffstat (limited to 'sbin/devd')
-rw-r--r--sbin/devd/Makefile5
-rw-r--r--sbin/devd/devd.conf19
-rw-r--r--sbin/devd/dhclient.conf19
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
@@ -45,19 +45,6 @@ notify 0 {
};
#
-# 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";
+};