From: Jami Kettunen Date: Sun, 10 Jul 2022 12:39:08 +0000 (+0300) Subject: container: Only umount /sys/fs/cgroup/schedtune if needed X-Git-Tag: 1.3.0~16 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/dff88fd18aa3f843d336b72bf989057314ddbcc0 container: Only umount /sys/fs/cgroup/schedtune if needed Silences the following useless log from "waydroid log" outputs when the directory either doesn't exist at all (mainline Linux devices), or when it's not mounted on Halium: (027693) [15:21:39] % umount -l /sys/fs/cgroup/schedtune umount: /sys/fs/cgroup/schedtune: not mounted Reference: https://docs.python.org/3/library/os.path.html#os.path.ismount --- diff --git a/tools/actions/container_manager.py b/tools/actions/container_manager.py index d6ce155..f242b86 100644 --- a/tools/actions/container_manager.py +++ b/tools/actions/container_manager.py @@ -169,8 +169,9 @@ def start(args): if which("start"): command = ["start", "cgroup-lite"] tools.helpers.run.user(args, command, check=False) - command = ["umount", "-l", "/sys/fs/cgroup/schedtune"] - tools.helpers.run.user(args, command, check=False) + if os.path.ismount("/sys/fs/cgroup/schedtune"): + command = ["umount", "-l", "/sys/fs/cgroup/schedtune"] + tools.helpers.run.user(args, command, check=False) #TODO: remove NFC hacks if which("stop"):