bullseye migration: add critical fix for RPi failing to get network on reboot

This commit is contained in:
Alexandre Aubin 2022-08-13 19:04:54 +02:00
parent d2a6dcd41a
commit 98506d6a73

View file

@ -185,6 +185,17 @@ class MyMigration(Migration):
del services["postgresql"]
_save_services(services)
#
# Critical fix for RPI otherwise network is down after rebooting
# https://forum.yunohost.org/t/20652
#
if os.system("systemctl | grep -q dhcpcd") == 0:
os.system("mkdir -p /etc/systemd/system/dhcpcd.service.d")
write_to_file(
"/etc/systemd/system/dhcpcd.service.d/wait.conf",
'[Service]\nExecStart=\nExecStart=/usr/sbin/dhcpcd -w'
)
#
# Main upgrade
#