From d2389bea2e322bd79e95723311684169f18d6dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Klouda?= Date: Sat, 24 Sep 2022 20:26:23 +0200 Subject: [PATCH] Fix switch to cgroup v1 for Debian 11 on Raspberry Pi There was wrong path used, as `/boot/cmdline.txt` is only used on Rapbian or RaspiOS which are not supported . --- homeassistant-supervised/DEBIAN/postinst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index 8b03d6b..6ff90de 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -132,7 +132,7 @@ chmod a+x "${PREFIX}/sbin/hassio-apparmor" systemctl enable hassio-apparmor.service > /dev/null 2>&1; systemctl start hassio-apparmor.service -# Start Supervisor +# Start Supervisor info "Start Home Assistant Supervised" systemctl start hassio-supervisor.service @@ -150,16 +150,15 @@ then update-grub touch /var/run/reboot-required fi -elif [ -f /boot/cmdline.txt ] +elif [ -f /boot/firmware/cmdline.txt ] then - if ! grep -q "systemd.unified_cgroup_hierarchy=false" /boot/cmdline.txt; then + if ! grep -q "systemd.unified_cgroup_hierarchy=false" /boot/firmware/cmdline.txt; then info "Switching to cgroup v1" - cp /boot/cmdline.txt /boot/cmdline.txt.bak - sed -i 's/$/ systemd.unified_cgroup_hierarchy=false/' /boot/cmdline.txt + sed -i.bak 's/$/ systemd.unified_cgroup_hierarchy=false/' /boot/firmware/cmdline.txt touch /var/run/reboot-required fi else - warn "Could not find /etc/default/grub or /boot/cmdline.txt failed to switch to cgroup v1" + warn "Could not find /etc/default/grub or /boot/firmware/cmdline.txt failed to switch to cgroup v1" fi info "Within a few minutes you will be able to reach Home Assistant at:" info "http://homeassistant.local:8123 or using the IP address of your"