← Back to context

Comment by ajross

3 days ago

So for those who want the tl;dr: The answer is just "use a udev rule".

Udev is one of those classic open source tools that is immensely powerful and gracefully well designed, with all sorts of emergent power...

...that ends up being an obscure bit of graybeard prestidigitation purely because of it's awful syntax.

No really, there's a very clean mapping between the state in sysfs and the resulting uevents produced. You just can't tell because of the way it looks.

If you don't like udev (and I don't blame you, I hate it too), you can do the exact same thing with mdev or acpid.

  • Oh, I like udev! I'm just sad that so few people know anything about how sysfs/uevents/udev work, because it seems so ugly and arcane when you're exposed to your first udev rule.

    • > I'm just sad that so few people know anything about how sysfs/uevents/udev work

      Here's the opportunity to write a blog post about it.