Bug#630614: actually make devd useful (for things like USB autoload, Eee-PC hotkeys, ZFS warnings)
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Bug#630614: actually make devd useful (for things like USB autoload, Eee-PC hotkeys, ZFS warnings)
- From: Robert Millan <rmh@debian.org>
- Date: Wed, 15 Jun 2011 17:32:02 +0200
- Message-id: <20110615153202.34411.58964.reportbug@dimoni>
- Reply-to: Robert Millan <rmh@debian.org>, 630614@bugs.debian.org
Package: freebsd-utils
Version: 8.2-2
Severity: wishlist
The following config files could be included to make devd useful:
devd.conf: This is a simplified version from upstream src/etc/devd.conf. As
the upstream version includes lots of FreeBSD-specific declarations, I'm not
sure if it's worth patching it, I propose forking a new file instead.
asus.conf: Unmodified from upstream src/etc/devd/asus.conf. This enables
support for ASUS Eee-PC special hotkeys.
usb_class.conf: I wrote this one myself, it enables automated kldload support
for the following drivers: snd_uaudio, ulpt, umass.
zfs.conf: ZFS-specific snippet from upstream devd.conf. I guess it could
fit better in zfsutils package?
Additionally, this daemon is missing an init.d script. I'd provide one, but
my init-fu is rotten since the dependency-based boot transition.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)
Kernel: kFreeBSD 8.2-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages freebsd-utils depends on:
ii libbsd0 0.3.0-1 utility functions from BSD systems
ii libc0.1 2.13-7 Embedded GNU C Library: Shared lib
ii libcam0 8.2-2 FreeBSD CAM (Common Access Method)
ii libgcc1 1:4.6.0-13 GCC support library
ii libgeom0 8.2-2 FreeBSD GEOM library
ii libkiconv4 8.2-2 FreeBSD kernel side iconv library
ii libkvm0 8.2-2 FreeBSD kvm (kernel memory interfa
ii libsbuf0 8.2-2 FreeBSD string buffer library
ii libstdc++6 4.6.0-13 GNU Standard C++ Library v3
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
freebsd-utils recommends no packages.
Versions of packages freebsd-utils suggests:
pn freebsd-hackedutils <none> (no description available)
ii kbdcontrol 8.2-2 command-line tool to change keyboa
ii vidcontrol 8.2-2 command-line tool to control the s
-- no debconf information
#
# Refer to devd.conf(5) and devd(8) man pages for the details on how to
# run and configure devd.
#
# NB: All regular expressions have an implicit ^$ around them.
# NB: device-name is shorthand for 'match device-name'
options {
# Each directory directive adds a directory the list of directories
# that we scan for files. Files are read-in in the order that they
# are returned from readdir(3). The rule-sets are combined to
# create a DFA that's used to match events to actions.
directory "/etc/devd";
pid-file "/var/run/devd.pid";
# Setup some shorthand for regex that we use later in the file.
#XXX Yes, these are gross -- imp
set scsi-controller-regex
"(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\
esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\
[0-9]+";
};
# Note that the attach/detach with the highest value wins, so that one can
# override these general rules.
# Notify all users before beginning emergency shutdown when we get
# a _CRT or _HOT thermal event and we're going to power down the system
# very soon.
notify 10 {
match "system" "ACPI";
match "subsystem" "Thermal";
match "notify" "0xcc";
action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'";
};
# $FreeBSD$
#
# ASUS specific devd events
# The next blocks enable volume hotkeys that can be found on the Asus laptops
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS";
match "notify" "0x32";
action "mixer 0";
};
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS";
match "notify" "0x31";
action "mixer vol -10";
};
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS";
match "notify" "0x30";
action "mixer vol +10";
};
# The next blocks enable volume hotkeys that can be found on the Asus EeePC
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS-Eee";
match "notify" "0x13";
action "mixer 0";
};
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS-Eee";
match "notify" "0x14";
action "mixer vol -10";
};
notify 0 {
match "system" "ACPI";
match "subsystem" "ASUS-Eee";
match "notify" "0x15";
action "mixer vol +10";
};
# Enable user hotkeys that can be found on the Asus EeePC
# The four keys above the keyboard notify 0x1a through to 0x1d respectively
#notify 0 {
# match "system" "ACPI";
# match "subsystem" "ASUS-Eee";
# match "notify" "0x1a";
# action "";
#};
#notify 0 {
# match "system" "ACPI";
# match "subsystem" "ASUS-Eee";
# match "notify" "0x1b";
# action "";
#};
#notify 0 {
# match "system" "ACPI";
# match "subsystem" "ASUS-Eee";
# match "notify" "0x1c";
# action "";
#};
#notify 0 {
# match "system" "ACPI";
# match "subsystem" "ASUS-Eee";
# match "notify" "0x1d";
# action "";
#};
nomatch 10 {
match "bus" "uhub[0-9]+";
match "intclass" "0x01";
action "kldload snd_uaudio";
};
nomatch 10 {
match "bus" "uhub[0-9]+";
match "intclass" "0x07";
action "kldload ulpt";
};
nomatch 10 {
match "bus" "uhub[0-9]+";
match "intclass" "0x08";
action "kldload umass";
};
# 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'";
};
Reply to: