[Midnightbsd-cvs] src [11799] trunk/etc/devd.conf: update examples
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 11 20:12:40 EDT 2018
Revision: 11799
http://svnweb.midnightbsd.org/src/?rev=11799
Author: laffer1
Date: 2018-07-11 20:12:39 -0400 (Wed, 11 Jul 2018)
Log Message:
-----------
update examples
Modified Paths:
--------------
trunk/etc/devd.conf
Modified: trunk/etc/devd.conf
===================================================================
--- trunk/etc/devd.conf 2018-07-12 00:08:43 UTC (rev 11798)
+++ trunk/etc/devd.conf 2018-07-12 00:12:39 UTC (rev 11799)
@@ -34,7 +34,7 @@
# NB: DETACH events are ignored; the kernel should handle all cleanup
# (routes, arp cache). Beware of races against immediate create
# of a device with the same name; e.g.
-# ifconfig bridge0 destroy; ifconfig bridge0 create
+# ifconfig bridge0 destroy; ifconfig bridge0 create
#
notify 0 {
match "system" "IFNET";
@@ -119,6 +119,15 @@
match "system" "DEVFS";
match "subsystem" "CDEV";
match "type" "CREATE";
+ match "cdev" "atp[0-9]+";
+
+ action "/etc/rc.d/moused quietstart $cdev";
+};
+
+notify 100 {
+ match "system" "DEVFS";
+ match "subsystem" "CDEV";
+ match "type" "CREATE";
match "cdev" "ums[0-9]+";
action "/etc/rc.d/moused quietstart $cdev";
@@ -127,6 +136,15 @@
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
+ match "type" "CREATE";
+ match "cdev" "wsp[0-9]+";
+
+ action "/etc/rc.d/moused quietstart $cdev";
+};
+
+notify 100 {
+ match "system" "DEVFS";
+ match "subsystem" "CDEV";
match "type" "DESTROY";
match "cdev" "ums[0-9]+";
@@ -165,7 +183,7 @@
};
#
-# Rescan scsi device-names on attach, but not detach. However, it is
+# Rescan SCSI device-names on attach, but not detach. However, it is
# disabled by default due to reports of problems.
#
attach 0 {
@@ -228,37 +246,6 @@
action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'";
};
-# Sample ZFS problem reports handling.
-notify 10 {
- match "system" "ZFS";
- match "type" "zpool";
- action "logger -p kern.err 'ZFS: failed to load zpool $pool'";
-};
-
-notify 10 {
- match "system" "ZFS";
- match "type" "vdev";
- action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'";
-};
-
-notify 10 {
- match "system" "ZFS";
- match "type" "data";
- action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'";
-};
-
-notify 10 {
- match "system" "ZFS";
- match "type" "io";
- action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'";
-};
-
-notify 10 {
- match "system" "ZFS";
- match "type" "checksum";
- action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
-};
-
# User requested suspend, so perform preparation steps and then execute
# the actual suspend process.
notify 10 {
@@ -305,13 +292,12 @@
# events. See the ACPI specification for more information about
# notifies. Here is the information returned for each subsystem:
#
-# ACAD: AC line state (0 is offline, 1 is online)
-# Button: Button pressed (0 for power, 1 for sleep)
-# CMBAT: ACPI battery events
-# Lid: Lid state (0 is closed, 1 is open)
-# RCTL: Resource limits
+# ACAD: AC line state (0 is offline, 1 is online)
+# Button: Button pressed (0 for power, 1 for sleep)
+# CMBAT: ACPI battery events
+# Lid: Lid state (0 is closed, 1 is open)
# Suspend, Resume: Suspend and resume notification
-# Thermal: ACPI thermal zone events
+# Thermal: ACPI thermal zone events
#
# This example calls a script when the AC state changes, passing the
# notify value as the first argument. If the state is 0x00, it might
@@ -324,11 +310,30 @@
};
# This example works around a memory leak in PostgreSQL, restarting
-# it when the "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered.
+# it when the "user:postgres:swap:devctl=1G" rctl(8) rule gets triggered.
notify 0 {
match "system" "RCTL";
- match "rule" "user:70:swap:.*";
- action "/usr/local/etc/rc.d/postgresql restart"
+ match "rule" "user:770:swap:.*";
+ action "/usr/local/etc/rc.d/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.
+# Replace action with a proper coredump handler, but be aware that
+# it will run with elevated privileges.
+notify 10 {
+ match "system" "kernel";
+ match "subsystem" "signal";
+ match "type" "coredump";
+ action "logger $comm $core";
+};
+
*/
More information about the Midnightbsd-cvs
mailing list