Hey Lennart, Lennart Poettering [2015-01-27 22:46 +0100]: > So I figure the bit that is missing here is the fact that the .device > units for CD drives and USB card readers don't care for media sense right > now.
Indeed, I had a similar thought on my evening walk: This works well for USB sticks and the like, but the /dev/sr0 node for CDs always stays around after eject. IOW, you get a change event, not a remove one. This is also why the cleanup in udisks 1.x (probably) didn't actually work. > However, I think it would make a ton of sense to change that, and set > SYSTEMD_READY=0 on all block devices where the media sensing suggests > that no medium is in it. This would mean that these devices don't show > up as systemd units until you actually put a medium in it. That would > be a change of semantics, but I think a useful one. That sounds good indeed! I can sit down at qemu tomorrow and simulate some CD insertions/removals, and come up with an udev rule for this. Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel