From fc08b71b971ad6a4a9d6575d3a3b2271f26a8ed1 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sat, 31 Dec 2022 12:57:42 +0100 Subject: [PATCH] lxc: Fixup apparmor detection `aa-status --quiet` is not a valid flag, but it still returned 0 --- tools/helpers/lxc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/helpers/lxc.py b/tools/helpers/lxc.py index 19a7ceb..50c3c16 100644 --- a/tools/helpers/lxc.py +++ b/tools/helpers/lxc.py @@ -132,8 +132,8 @@ def generate_nodes_lxc_config(args): LXC_APPARMOR_PROFILE = "lxc-waydroid" def get_apparmor_status(args): enabled = False - if shutil.which("aa-status"): - enabled = (tools.helpers.run.user(args, ["aa-status", "--quiet"], check=False) == 0) + if shutil.which("aa-enabled"): + enabled = (tools.helpers.run.user(args, ["aa-enabled", "--quiet"], check=False) == 0) if not enabled and shutil.which("systemctl"): enabled = (tools.helpers.run.user(args, ["systemctl", "is-active", "-q", "apparmor"], check=False) == 0) try: -- 2.47.3