Use raspi-config to toggle boot_wait

This commit is contained in:
Serge Schneider 2021-10-05 15:54:05 +01:00
parent d0eed3b76f
commit ac246e300b
3 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,12 @@
#!/bin/bash -e
install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"
install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 0
EOF
if [ -v WPA_COUNTRY ]; then
echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
fi

View File

@ -1,3 +0,0 @@
[Service]
ExecStart=
ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w

View File

@ -1,3 +1,5 @@
#!/bin/bash -e
rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf"
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1
EOF