finit: Wait for the temporary udev before finit exited it
my sound card did not work after i updated to 3.1-rc2.
In short, it’s a bug of https://github.com/troglobit/finit/commit/00fe37174d7104204e1203956ac965f8fa996090. Finit exited the temporary udevd after setting up the devices tree, this is fine. But the point is, finit exited udevd before all his work were done. You need to use settle to wait. In detail, his work is not limited to /dev, also /run/udev. There’re lots of files to generate, If i am correct, temporary udevd exited before all files were generated.
My hot-fix patch is more easier to understand, just a proof of concept. Since there has been lots of new changes in code base, i am not sure if the code is suitable or not. I’d like to leave the work to you 😃.
--- a/src/finit.c 2018-01-19 14:52:57.765287302 +0000
+++ b/src/finit.c 2018-01-19 14:52:41.975333534 +0000
@@ -409,8 +409,5 @@
if (udev && whichp("udevadm")) {
run("udevadm trigger --action=add --type=subsystems");
run("udevadm trigger --action=add --type=devices");
- run("udevadm settle --timeout=120");
-
- /* Tell temporary udevd to exit, we'll start a monitored instance later */
- run("udevadm control --exit");
+ run("udevadm settle --timeout=120 && udevadm control --exit");
}
}
EDIT: actually, it’s pulseaudio that did not work
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 29 (29 by maintainers)
Commits related to this issue
- Issue #96: Register two unique (!) udev triggers, run device trig 1st Signed-off-by: Joachim Nilsson <troglobit@gmail.com> — committed to troglobit/finit by troglobit 6 years ago
- Issue #96: Add udevd condition to udevadm trigger commands We must wait for udevd to be started before we call udevadm. However, udevd doesn't create a PID file, so we must also fake this. There is... — committed to troglobit/finit by troglobit 6 years ago
- Issue #96: Remember to track run commands having run once as well All service/task commands are tracked by the state machine, but run commands are a bit special since they must run in sequence. Henc... — committed to troglobit/finit by troglobit 6 years ago
@troglobit It’s ok. And no, let me close the issue.