From d88ff266c6aaaf70c2f68eca905447203ebee37d Mon Sep 17 00:00:00 2001 From: Chris Sutcliff Date: Tue, 18 Jun 2024 17:06:21 +0100 Subject: [PATCH] cachyos-settings: add is-enabled check around uksmd disable (#241) This prevents an error when it is already disabled or not installed. --- cachyos-settings/cachyos-settings.install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cachyos-settings/cachyos-settings.install b/cachyos-settings/cachyos-settings.install index c77d69cd..8e870777 100644 --- a/cachyos-settings/cachyos-settings.install +++ b/cachyos-settings/cachyos-settings.install @@ -18,6 +18,8 @@ post_upgrade() { systemctl enable "$service" fi done - echo "Disabling uksmd, managed now via systemd 256 MemoryKSM" - systemctl disable uksmd + if systemctl is-enabled uksmd >/dev/null; then + echo "Disabling uksmd, managed now via systemd 256 MemoryKSM" + systemctl disable uksmd + fi }