Summary: | =sys-fs/udev-init-scripts-9999 does not create the /run/udev/rules.d directory before using it | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pim Vullers <gentoo.org> |
Component: | [OLD] Core system | Assignee: | udev maintainers <udev-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, kripton, nikoli |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for udev-init-scripts
Create /run/udev/rules.d when required 0001-Fix-population-of-run-udev-rules.d-for-newnet.patch |
Description
Pim Vullers
2013-01-23 11:35:42 UTC
Confirming: Using sys-apps/systemd-197-r1 there is no directory /run/udev/rules.d but /run/udev$ ls -ll total 4 srw------- 1 root root 0 23. Jan 11:17 control drwxr-xr-x 2 root root 16120 23. Jan 11:17 data drwxr-xr-x 83 root root 1660 23. Jan 11:17 links -rw-r--r-- 1 root root 8 23. Jan 11:17 queue.bin drwxr-xr-x 6 root root 120 23. Jan 11:17 tags drwxr-xr-x 2 root root 280 23. Jan 11:17 watch This seems like a udev-init-scripts problem, not an openrc problem. (In reply to comment #2) > This seems like a udev-init-scripts problem, not an openrc problem. No, it isn't a udev-init-scripts problem. udev-init-scripts has no idea about the /run/udev directory or its contents. Also, see comment #1. If we do create it in udev-init-scripts this will not fix the issue for systemd users, so maybe udev itself should create this. It may be a udev problem thinking about it though (see comment #2 for why since systemd doesn't use udev-init-scripts). (In reply to comment #3) My thought was that any program writing files to /run/udev/rules.d should mkdir -p /run/udev/rules.d first. That ensures there are no race conditions on start up. (In reply to comment #4) > (In reply to comment #3) > > My thought was that any program writing files to /run/udev/rules.d should > mkdir -p /run/udev/rules.d first. That ensures there are no race conditions > on start up. That could be done, but it wouldn't be a udev-init-scripts issue, because udev-init-scripts doesn't create /run/udev. We already have two things that would have to be fixed; systemd and openrc. But, I would rather talk to upstream (I'm not sure I'll be able to today) about getting udev to create /run/udev/rules.d when it creates /run/udev. (In reply to comment #5) systemd does not write any rules in /run/udev/rules.d, so that is a non-issue. /etc/init.d/udev (part of udev-init-scripts) does write rules in /run/udev/rules.d. Therefore, using my strategy, udev-init-scripts would require a fix. Here's a little feedback from #systemd: <floppym> kay: How would you reccomend creating /run/udev/rules.d? Should that be handled by the udev startup script/process, or by whatever program is writing rules there? <kay> floppym: i have never used it, and i wouldn't :) <floppym> Heh. <kay> floppym: you need to tell udev to reload, it will not find out that there are new rules <kay> floppym: i guess the one that drops the file there, and does the reload can do the mkdir too <floppym> Ah. I was under the impression there was some kind of inotify thing happening or something. <floppym> Good to know it isn't that simle. <kay> old udevs did inotify, but it's gone in the systemd code Created attachment 336802 [details, diff]
Patch for udev-init-scripts
Should be created where used I guess
psst...
And how is that tmpfiles.d support currently?
We could just make one of the tmpfile to create the dir for us once it's implemented if it already isn't
JFYI 1. dracut always create this dir. It seems it never use it itself. UDEVVERSION=$(udevadm --version) if [ $UDEVVERSION -gt 166 ]; then # newer versions of udev use /run/udev/rules.d export UDEVRULESD=/run/udev/rules.d [ -d /run/udev ] || mkdir -p -m 0755 /run/udev [ -d $UDEVRULESD ] || mkdir -p -m 0755 $UDEVRULESD else mkdir -m 0755 /dev/.udev /dev/.udev/rules.d export UDEVRULESD=/dev/.udev/rules.d fi 2. "udevadm control --reload" can be used to reload rules. Created attachment 336842 [details, diff]
Create /run/udev/rules.d when required
got last attachment reversed, this one is the real one
Created attachment 336844 [details, diff]
0001-Fix-population-of-run-udev-rules.d-for-newnet.patch
I think we also need to move disable_oldnet_hotplug
applied as 21-r1 to tree, WilliamH gets to close this bug after committing to git and releasing new udev-init-scripts -- adjusting $summary accordingly This is now committed to the git repository for 9999 -> Closing. Thanks everyone. |