mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +00:00
system: use reasonable cgroup names from hotplug services
Instead of /system/10-hotplug/ we now place udevd, mdevd, and others, in more aptly named groups using the new 'name:' syntax. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+10
-10
+10
-10
@@ -18,33 +18,33 @@
|
|||||||
# change the contents any way you like, it can even be empty.
|
# change the contents any way you like, it can even be empty.
|
||||||
|
|
||||||
# Check for systemd-udevd and eudev, if we find both, we opt for the latter.
|
# Check for systemd-udevd and eudev, if we find both, we opt for the latter.
|
||||||
service nowarn cgroup.system name:udevd notify:none env:-/etc/default/udevd pid:udevd log \
|
service nowarn cgroup.system,name:udevd name:udevd notify:none env:-/etc/default/udevd pid:udevd log \
|
||||||
[S12345789] /lib/systemd/systemd-udevd $UDEVD_ARGS -- Device event daemon (udev)
|
[S12345789] /lib/systemd/systemd-udevd $UDEVD_ARGS -- Device event daemon (udev)
|
||||||
service nowarn cgroup.system name:udevd notify:none env:-/etc/default/udevd pid:udevd log \
|
service nowarn cgroup.system,name:udevd name:udevd notify:none env:-/etc/default/udevd pid:udevd log \
|
||||||
[S12345789] udevd $UDEVD_ARGS -- Device event daemon (udev)
|
[S12345789] udevd $UDEVD_ARGS -- Device event daemon (udev)
|
||||||
|
|
||||||
# Wait for udevd to start, then trigger coldplug events and module loading.
|
# Wait for udevd to start, then trigger coldplug events and module loading.
|
||||||
# The last 'settle' call waits for it to finalize processing all uevents.
|
# The last 'settle' call waits for it to finalize processing all uevents.
|
||||||
run nowarn if:udevd cgroup.init :1 [S] <service/udevd/ready> log udevadm settle -t 0 --
|
run nowarn if:udevd cgroup.init,name:udevadm :1 [S] <service/udevd/ready> log udevadm settle -t 0 --
|
||||||
run nowarn if:udevd cgroup.init :2 [S] <service/udevd/ready> log udevadm control --reload --
|
run nowarn if:udevd cgroup.init,name:udevadm :2 [S] <service/udevd/ready> log udevadm control --reload --
|
||||||
run nowarn if:udevd cgroup.init :3 [S] <service/udevd/ready> log udevadm trigger -c add -t devices -- Requesting device events
|
run nowarn if:udevd cgroup.init,name:udevadm :3 [S] <service/udevd/ready> log udevadm trigger -c add -t devices -- Requesting device events
|
||||||
run nowarn if:udevd cgroup.init :4 [S] <service/udevd/ready> log udevadm trigger -c add -t subsystems -- Requesting subsystem events
|
run nowarn if:udevd cgroup.init,name:udevadm :4 [S] <service/udevd/ready> log udevadm trigger -c add -t subsystems -- Requesting subsystem events
|
||||||
run nowarn if:udevd cgroup.init :5 [S] <service/udevd/ready> log udevadm settle -t 30 -- Waiting for udev to finish
|
run nowarn if:udevd cgroup.init,name:udevadm :5 [S] <service/udevd/ready> log udevadm settle -t 30 -- Waiting for udev to finish
|
||||||
|
|
||||||
# If udevd is not available, check for mdevd. Unlike plain 'mdev -df', the
|
# If udevd is not available, check for mdevd. Unlike plain 'mdev -df', the
|
||||||
# mdevd-coldplug process exits when mdevd has completed. So the condition
|
# mdevd-coldplug process exits when mdevd has completed. So the condition
|
||||||
# <run/coldplug/success> (same as for plain mdev below) can be relied on as a
|
# <run/coldplug/success> (same as for plain mdev below) can be relied on as a
|
||||||
# barrier for services that, e.g., need to probe for switchcore ports or PHYs
|
# barrier for services that, e.g., need to probe for switchcore ports or PHYs
|
||||||
# that require firmware loading before they show up.
|
# that require firmware loading before they show up.
|
||||||
service nowarn conflict:udevd,mdev cgroup.init notify:none if:!udevd \
|
service nowarn conflict:udevd,mdev cgroup.init,name:mdevd notify:none if:!udevd \
|
||||||
[S12345789] notify:s6 mdevd -O 4 -D %n -- Device event daemon (mdevd)
|
[S12345789] notify:s6 mdevd -O 4 -D %n -- Device event daemon (mdevd)
|
||||||
run nowarn conflict:udevd,mdev cgroup.init name:coldplug <service/mdevd/ready> \
|
run nowarn conflict:udevd,mdev cgroup.init,name:coldplug <service/mdevd/ready> \
|
||||||
[S] mdevd-coldplug -- Cold plugging system
|
[S] mdevd-coldplug -- Cold plugging system
|
||||||
|
|
||||||
# If neither udevd or mdevd are available, fall back to mdev. The new daemon
|
# If neither udevd or mdevd are available, fall back to mdev. The new daemon
|
||||||
# mode calls `mdev -s` internally but does not create a PID file when that is
|
# mode calls `mdev -s` internally but does not create a PID file when that is
|
||||||
# done, so synchronization with coldplug is fragile.
|
# done, so synchronization with coldplug is fragile.
|
||||||
service nowarn conflict:udevd,mdevd cgroup.init notify:none if:!udevd,!mdevd \
|
service nowarn conflict:udevd,mdevd cgroup.init,name:mdev notify:none if:!udevd,!mdevd \
|
||||||
[S12345789] mdev -df -S -- Device event daemon (mdev)
|
[S12345789] mdev -df -S -- Device event daemon (mdev)
|
||||||
|
|
||||||
# Trigger a replay of all uevents from boot, before userspace was up and the
|
# Trigger a replay of all uevents from boot, before userspace was up and the
|
||||||
|
|||||||
Reference in new issue
Block a user