aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2023-11-07 10:06:15 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2023-11-24 09:45:03 +0000
commitb3c116d50ecacaab5236e0488cb74c1bcf614ae7 (patch)
tree06efc7c7a753b9c86d720b51dd81fca88e0f91ef
parent5a78fcfce4c563fcd47dcfb6f36aff2bdd14839b (diff)
devd: autofs: Move autofs related events to a separate file
If a user don't have FreeBSD-autofs installed there is no need to try calling automount on every GEOM event. It's also easier to add/delete autofs related event in a separate file. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D42495 Reviewed by: imp
-rw-r--r--sbin/devd/Makefile5
-rw-r--r--sbin/devd/autofs.conf9
-rw-r--r--sbin/devd/devd.conf7
3 files changed, 14 insertions, 7 deletions
diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index 7f334ad6b409..68ff477f09c9 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -11,6 +11,11 @@ DEVDDIR= /etc/devd
DEVD+= asus.conf
.endif
+CONFGROUPS+= AUTOFS
+AUTOFSDIR= ${DEVDDIR}
+AUTOFS+= autofs.conf
+AUTOFSPACKAGE= autofs
+
CONFGROUPS+= DHCLIENT
DHCLIENTDIR= ${DEVDDIR}
DHCLIENT+= dhclient.conf
diff --git a/sbin/devd/autofs.conf b/sbin/devd/autofs.conf
new file mode 100644
index 000000000000..a06ca7295d38
--- /dev/null
+++ b/sbin/devd/autofs.conf
@@ -0,0 +1,9 @@
+#
+# autofs(5) specific devd events
+
+# Discard autofs caches, useful for the -media special map.
+notify 100 {
+ match "system" "GEOM";
+ match "subsystem" "DEV";
+ action "/usr/sbin/automount -c";
+};
diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf
index d793dd296437..08cbeb840b2f 100644
--- a/sbin/devd/devd.conf
+++ b/sbin/devd/devd.conf
@@ -136,13 +136,6 @@ notify 0 {
action "service postgresql restart";
};
-# Discard autofs caches, useful for the -media special map.
-notify 100 {
- match "system" "GEOM";
- match "subsystem" "DEV";
- action "/usr/sbin/automount -c";
-};
-
# Handle userland coredumps.
# This commented out handler makes it possible to run an
# automated debugging session after the core dump is generated.