diff options
Diffstat (limited to 'scripts/kvmd-bootconfig')
-rwxr-xr-x | scripts/kvmd-bootconfig | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/kvmd-bootconfig b/scripts/kvmd-bootconfig index d22d1845..98bcb4a4 100755 --- a/scripts/kvmd-bootconfig +++ b/scripts/kvmd-bootconfig @@ -92,7 +92,7 @@ TTYVHangup=no TTYVTDisallocate=no end_of_file systemctl enable [email protected] - REBOOT=1 + touch /boot/pikvm-reboot.txt fi @@ -130,16 +130,23 @@ ClientIdentifier=mac end_of_file wpa_passphrase "$WIFI_ESSID" "$WIFI_PASSWD" > "/etc/wpa_supplicant/wpa_supplicant-$WIFI_IFACE.conf" systemctl enable "wpa_supplicant@$WIFI_IFACE.service" || true - REBOOT=1 + touch /boot/pikvm-reboot.txt fi +# ========== Custom scripts ========== +for script in `ls /etc/kvmd/bootconfig.d | sort`; do + /etc/kvmd/bootconfig.d/"$script" || true +done + + # ========== Finish ========== rm -f /boot/pikvm.txt ro -if [ -n "$REBOOT" ]; then +if [ -f /boot/pikvm-reboot.txt ]; then + rm -f /boot/pikvm-reboot.txt echo "kvmd-bootconfig: Reboot after 5 seconds" | tee /dev/kmsg sleep 2 reboot |