[systemd-devel] Udev rule question

Armin K. krejzi at email.com
Thu Jul 25 03:51:05 PDT 2013


we have been using Udev without systemd (currently tracking version 205)
and we have a problem. The rule that worked some time ago (can't
remember when) doesn't work anymore.

It's alsa-utils rule for restoring the volume at boot using Udev rule.

This is the current rule which doesn't work:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*",
KERNELS!="card*", GOTO="alsa_restore_go"

TEST!="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl restore
TEST=="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl nrestore


The rule was changed in 1.0.27 release. Before 1.0.27 release it was
like this:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="card*", \
         RUN+="/usr/sbin/alsactl restore $attr{number}"

Unfortunately, none of these work anymore. I don't know if something is
wrong with rules. If so, please say what and I'll report it to upstream.

Also, I presume that driver is built in into kernel, but similar rule
for rtc clock saving/restoring is working fine with rtc driver builtin.

And no, systemd+udev is not an option (I've tried my best, sorry).
Everything else appears to work.

Looking forward to any advice. Thanks in advance.

More information about the systemd-devel mailing list