Conversation
|
I think makes sense to trigger and settle on every restart. Missed events are not just a first boot issues theoretically. |
470c015 to
5f2f350
Compare
| ( | ||
| i=0 | ||
| while [ ! -S /run/udev/control ] && [ "$i" -lt 50 ]; do | ||
| sleep 0.1 |
There was a problem hiding this comment.
using a non-integer time value for sleep is not posix, this may cause issues for some users
There was a problem hiding this comment.
Fractions are available in coreutils and busybox. I didn't consider Void users running alternative userlands. Will do some digging.
There was a problem hiding this comment.
I couldn't come up with a better answer than accept waiting for a full second. Updated.
There was a problem hiding this comment.
then you'll want to remove the loop
There was a problem hiding this comment.
Wouldn't that introduce a race condition where the sub-shell could run and exit before the socket comes up?
Udev is initially ran unsupervised then restarted by runit. Events that happen during restart may leave devices with incorrect permissions. This waits for the socket to become available then triggers a rescan. void-linux/void-runit#135
On restart, spawn a sub-shell that waits for the supervised instance of udev socket to come up, then rescan devices. This corrects permissions of devices that appear between sessions. Fixes void-linux/void-runit#135