From 9aae1f5f8300284fd5d2bd12cfb7b8a25dc32f8c Mon Sep 17 00:00:00 2001 From: fruchti Date: Thu, 17 Jul 2025 09:32:10 +0200 Subject: [PATCH] Auto-upgrade: Fix when no users are active --- options/auto-upgrade.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/auto-upgrade.nix b/options/auto-upgrade.nix index d0f9829..0c84db4 100644 --- a/options/auto-upgrade.nix +++ b/options/auto-upgrade.nix @@ -165,7 +165,7 @@ in activate_configuration="no" # Check if any user sessions are open - active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$') + active_users=$(users | tr ' ' '\n' | sort | uniq | grep -vE '^(${concatStringsSep "|" cfg.rebootIgnoreUsersActive})$' || true) if [ "$reboot_allowed" = "yes" ] && [ -n "$active_users" ] ; then reboot_allowed=no email_body="$(printf "%s\n%s\n%s" "$email_body" "The system cannot reboot since the following users are active:" "$active_users")"