From 11eb988683dd7d11e588fb9185f327e78319b591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20K=C3=B6hl?= Date: Fri, 17 Nov 2023 13:18:21 +0100 Subject: [PATCH] fix: fix recipes for Bookworm-based releases --- recipes/pi-cleanup/steps/00-install.sh | 7 ++++++- recipes/ssh/files/hydrate-ssh-host-keys.service | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/pi-cleanup/steps/00-install.sh b/recipes/pi-cleanup/steps/00-install.sh index bab45ba..ad0e597 100755 --- a/recipes/pi-cleanup/steps/00-install.sh +++ b/recipes/pi-cleanup/steps/00-install.sh @@ -5,8 +5,13 @@ set -euo pipefail export DEBIAN_FRONTEND=noninteractive systemctl disable userconfig -systemctl disable unattended-upgrades.service systemctl disable resize2fs_once +# Only exists on older (Debuan Buster) releases. +systemctl disable unattended-upgrades.service || true + +# Only exists on newer (Debian Bookworm) releases. +systemctl disable sshswitch.service || true + apt-get purge -y userconf-pi rm -f /etc/ssh/sshd_config.d/rename_user.conf diff --git a/recipes/ssh/files/hydrate-ssh-host-keys.service b/recipes/ssh/files/hydrate-ssh-host-keys.service index 5c076d3..5048c0f 100644 --- a/recipes/ssh/files/hydrate-ssh-host-keys.service +++ b/recipes/ssh/files/hydrate-ssh-host-keys.service @@ -1,8 +1,6 @@ [Unit] Description=Hydrate SSH Host Keys Before=ssh.service -ConditionPathIsReadWrite=/run/rugpi/state/ssh -ConditionFileIsExecutable=/usr/bin/ssh-keygen [Service] Type=oneshot