git: b3c116d50eca - main - devd: autofs: Move autofs related events to a separate file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Nov 2023 09:45:45 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=b3c116d50ecacaab5236e0488cb74c1bcf614ae7
commit b3c116d50ecacaab5236e0488cb74c1bcf614ae7
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-11-07 10:06:15 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-11-24 09:45:03 +0000
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
---
sbin/devd/Makefile | 5 +++++
sbin/devd/autofs.conf | 9 +++++++++
sbin/devd/devd.conf | 7 -------
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.