You are not logged in.

#1 2021-03-14 21:22:06

MilanKnizek
Member
Registered: 2005-12-13
Posts: 88

systemd.device - no more dev-*.device units in favour of sys-*.device?

Hi,

After update, I can see that all my device unit files start with sys-.....device instead of dev-.....device. This breaks some of my service unit files, which depend on dev-zwave-stick.device device alias created by udev.

As per /etc/udev/rules.d/90-z-stick.rules

SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idProduct}=="0200", ATTRS{idVendor}=="0658", SYMLINK+="zwave-stick", TAG+="systemd"

the symlink is created in /dev/zwave-stick.

But the corresponding device in systemd does not exist anymore. Instead I can see only:

sys-devices-pci0000:00-0000:00:1d.0-usb2-2\x2d1-2\x2d1.1-2\x2d1.1:1.0-tty-ttyACM0.device

The man page of systemd.device says:

Device units are named after the /sys/ and /dev/ paths they control.
Example: the device /dev/sda5 is exposed in systemd as dev-sda5.device.

Not sure, how I should persuade systemd to create device units from /dev/ path instead of /sys/ path. Or at least for my symlinked device.

P.S. I did work-around that by changing my service units to depend on "sys-*ttyACM0.device" - but that could pick up a different ACM device on the next reboot if the order changes.


--
Milan Knizek
http://knizek.net

Offline

Board footer

Powered by FluxBB