From 1571b87e48fde88deff6976f54e4559d9912f5eb Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Sun, 28 Apr 2019 11:42:06 +0200 Subject: [PATCH] Fix cgroup tmpfs mount, drop hardcoded --no-deploy --- files/etc/init.d/k3s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/etc/init.d/k3s b/files/etc/init.d/k3s index f8a26e7..774690c 100755 --- a/files/etc/init.d/k3s +++ b/files/etc/init.d/k3s @@ -10,7 +10,9 @@ ensure_cgroup_mount() { # Unmount /sys/fs/cgroup if mounted as cgroup grep ' /sys/fs/cgroup cgroup' /proc/self/mounts && umount /sys/fs/cgroup - mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup + grep ' /sys/fs/cgroup tmpfs' /proc/self/mounts \ + || mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup + for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do mnt="/sys/fs/cgroup/$sys" grep -q "cgroup $mnt " /proc/self/mounts && continue @@ -22,7 +24,7 @@ ensure_cgroup_mount() { start() { ensure_cgroup_mount start-stop-daemon -S -b -x "$EXEC" -m -p "$PIDFILE" \ - -- server $(uci_get k3s.globals.opts) --no-deploy traefik \ + -- server $(uci_get k3s.globals.opts) \ --data-dir $(uci_get k3s.globals.root) }