eudev-project / eudev

Repository for eudev development
GNU General Public License v2.0
522 stars 146 forks source link

why remove create static nodes from modules? #229

Open sandy-lcq opened 2 years ago

sandy-lcq commented 2 years ago

Here is the commit: https://gitweb.gentoo.org/proj/eudev.git/commit/?id=2b7abd5ec9cc47a8b895df6db77fb1537c6f1a39

with above commit, static nodes is not created, so after boot, there is no device like /dev/net/tun, but in 50-udev-default.rules, still have configuration KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun", then above config will also not take effect.

I know udevd in systemd also remove create static nodes from modules, but in systemd, in will still create static node by kmod-static-nodes.service and systemd-tmpfiles-setup-dev.service.

but when I use sysvinit, and use eudev, " /dev/net/tun" is not created.

ArsenArsen commented 2 years ago

as you said, it's now handled by tmpfiles services, you can use systemd-tmpfiles (as it works without systemd and can be compiled individually) or pick up opentmpfiles to fulfill this role

sandy-lcq commented 2 years ago

But when using sysVinit, if user still need to compile systemd, it make things complicate and not straightforward. kind of making sysVinit depend on systemd code. (opentmpfiles is dead and points you back to systemd-tmpfiles).

How about add this function back by add an option? if enable this option, user can still create static nodes.

ArsenArsen commented 2 years ago

The tmpfiles format has not changed much (at all?) in recent times, opentmpfiles should still work; the best course of action is probably to stick to it. AFAIU, but I don't mean to put words in their mouth, the OpenRC team decided against maintaining opentmpfiles because systemd-tmpfiles works without systemd in the first place, rather than for technical reasons.

I'm not sure whether reverting this change is beneficial, it'd likely be better for consumers who can't use tmpfiles to parse the output of kmod static-nodes -f tmpfiles, as it's very much a simple format.