You've already forked supervised-installer
mirror of
https://github.com/armbian/supervised-installer.git
synced 2026-01-06 12:31:12 -08:00
Switch from cgroup v1 to cgroup v2 in post-install script (#391)
* Switch from cgroup v1 to cgroup v2 in post-install script * Update homeassistant-supervised/DEBIAN/postinst Co-authored-by: Stefan Agner <stefan@agner.ch> * Fixed sed typo Co-authored-by: Stefan Agner <stefan@agner.ch> --------- Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
committed by
GitHub
parent
6224cefe44
commit
f57371cad5
@@ -163,21 +163,21 @@ systemctl start hassio-supervisor.service
|
||||
info "Installing the 'ha' cli"
|
||||
chmod a+x "${PREFIX}/bin/ha"
|
||||
|
||||
# Switch to cgroup v1
|
||||
# Switch to cgroup v2
|
||||
if [ -f /etc/default/grub ]
|
||||
then
|
||||
if ! grep -q "systemd.unified_cgroup_hierarchy=false" /etc/default/grub; then
|
||||
info "Switching to cgroup v1"
|
||||
if grep -q "systemd.unified_cgroup_hierarchy=false" /etc/default/grub; then
|
||||
info "Switching to cgroup v2"
|
||||
cp /etc/default/grub /etc/default/grub.bak
|
||||
sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&systemd.unified_cgroup_hierarchy=false /' /etc/default/grub
|
||||
sed -i 's/systemd\.unified_cgroup_hierarchy=false //' /etc/default/grub
|
||||
update-grub
|
||||
touch /var/run/reboot-required
|
||||
fi
|
||||
elif [ -f /boot/firmware/cmdline.txt ]
|
||||
then
|
||||
if ! grep -q "systemd.unified_cgroup_hierarchy=false" /boot/firmware/cmdline.txt; then
|
||||
info "Switching to cgroup v1"
|
||||
sed -i.bak 's/$/ systemd.unified_cgroup_hierarchy=false/' /boot/firmware/cmdline.txt
|
||||
if grep -q "systemd.unified_cgroup_hierarchy=false" /boot/firmware/cmdline.txt; then
|
||||
info "Switching to cgroup v2"
|
||||
sed -i.bak 's/ systemd\.unified_cgroup_hierarchy=false//' /boot/firmware/cmdline.txt
|
||||
touch /var/run/reboot-required
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user