- Package:
- runit-services
- Source:
- runit-services
- Submitter:
- Lorenzo Puliti
- Date:
- 2025-02-19 21:51:03 UTC
- Severity:
- normal
In order to address #1076728, 'sv start elogind' line was added to the docker runscript: however docker and elogind are unrelated and runit is a init system without a proper dependecy system, it does it with polling. So the less we are calling a rusncript in another one, the better it is. Please explore if it possible to fix #1076728 in another way for runit, for example mounting a cgroup(v2?) that is suitable for elogind early during the boot sequence.
the following in early boot task (stage 1 or SysV's rcS) seems to work
fine for elogind (still to be tested with docker).
if ! mountpoint -q /sys/fs/cgroup; then
if [ ! -d /sys/fs/cgroup ]; then
echo "creating cgroup directory..."
mkdir -p /sys/fs/cgroup
fi
echo "Mounting cgroupfsv2 hierarchy"
#TODO? mount a tmpfs on /sys/fs/cgroup??
mount -t cgroup2 -o \
rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot \
cgroup2 /sys/fs/cgroup
fi