cgroupfs-umount does not unmount /sys/fs/cgroup
cgroupfs-mount mounts /sys/fs/cgroup but cgroupfs-umount does not unmount it.
Is there any reason for that? I've extended my script with an umount command.
diff --git a/cgroupfs-umount b/cgroupfs-umount
index 994b66e..13458f4 100644
--- a/cgroupfs-umount
+++ b/cgroupfs-umount
@@ -28,4 +28,10 @@ for sys in *; do
fi
done
+# unmount /sys/fs/cgroup
+cd /sys/fs
+if mountpoint -q /sys/fs/cgroup; then
+ umount /sys/fs/cgroup
+fi
+
exit 0
Probably because for almost all users of this package, the only time cgroupfs-umount is ever used is at shutdown (and likely the only time it will ever actually succeed in unmounting things, unless you're very careful about your cgroups usage), so nobody's really noticed, and for those who have, having this one extra tmpfs mounted is fairly harmless. :smile:
(Additionally, these days one is hard-pressed to find users who don't already have cgroups mounted by systemd and friends, so this package/these scripts aren't getting much use or attention. :+1:)