elogind interferes with networking with unprivileged lxc 4.x containers.
by alex14641 from LinuxQuestions.org on (#5DTZX)
The current implementation of elogind symlinks /sys/fs/cgroup/elogind to /sys/fs/cgroup/systemd: this breaks the container networking. The following patch resolves the issue:
Code:--- /tmp/rc.elogind 2021-02-04 21:44:49.967760523 -0500
+++ /etc/rc.d/rc.elogind 2021-02-05 18:36:16.063994239 -0500
@@ -22,10 +22,8 @@
if [ ! -d /run/user ]; then
mkdir -p /run/user
fi
- if [ ! -d /run/systemd ]; then
+ if [ ! -d /run/elogind ]; then
mkdir -p /run/elogind /sys/fs/cgroup/elogind
- ( cd /run; rm -rf systemd; ln -sf elogind systemd; )
- ( cd /sys/fs/cgroup; rm -rf systemd; ln -sf elogind systemd; )
fi
if pgrep -l -F /run/elogind.pid 2>/dev/null | grep -q elogind; then
echo "Elogind is already running"


Code:--- /tmp/rc.elogind 2021-02-04 21:44:49.967760523 -0500
+++ /etc/rc.d/rc.elogind 2021-02-05 18:36:16.063994239 -0500
@@ -22,10 +22,8 @@
if [ ! -d /run/user ]; then
mkdir -p /run/user
fi
- if [ ! -d /run/systemd ]; then
+ if [ ! -d /run/elogind ]; then
mkdir -p /run/elogind /sys/fs/cgroup/elogind
- ( cd /run; rm -rf systemd; ln -sf elogind systemd; )
- ( cd /sys/fs/cgroup; rm -rf systemd; ln -sf elogind systemd; )
fi
if pgrep -l -F /run/elogind.pid 2>/dev/null | grep -q elogind; then
echo "Elogind is already running"