On Wed, 11.12.13 12:34, Peter Hutterer (peter.hutte...@who-t.net) wrote: > > If a module exposes those alias lines then the module is auto-loaded by > > udev as soon as matching hardware shows up. That's the preferable way to > > load kernel modules these days, instead of loading them explicitly they > > way you are doing it. > > > > Of course, what's behind an rs232 port is generally not automatically > > discoverable, that's why Kay was asking whether the modalias line is > > insufficient. > > ok, after spending half the day going down the most likely wrong track: are > we talking about auto-loading the module once inputattach is launched, or > dropping the need for inputattach? > > because if it's the former then yes, I can confirm that works and the module > is loaded correctly so the modalias seems to work here. we can drop the kmod > from the udev rule.
Well, it's udev that loads the kmod as the hw shows up, not inputattach that triggers the loading. inputattach comes later... > > It sounds like a good idea to get rid of the explicit module loading and > > simply rely on the modalias stuff for that. Then, if your program really > > only does what you list above (i.e. nothing that can block for longer or > > that needs to stay around during runtime), then you could just do this > > synchronously as part of an udev rule, no? > > sorry, I wasn't clear enough. inputattach does the above and then just sits > with a 0-byte read() to keep the line open. as soon as inputattach finishes > the device will revert back to just being a serial device. > so it's definitely not a one-shot, we need it to sit there. OK, then doing this as systemd service is the right thing. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel