#1095628 docker: stop calling 'sv start elogind'

#1095628#5
Date:
2025-02-09 23:22:22 UTC
From:
To:
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.

#1095628#10
Date:
2025-02-19 21:48:16 UTC
From:
To:
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