mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
pikvm/pikvm#73: run custom bootconfig scripts from /etc/kvmd/bootconfig.d
This commit is contained in:
@@ -92,7 +92,7 @@ TTYVHangup=no
|
||||
TTYVTDisallocate=no
|
||||
end_of_file
|
||||
systemctl enable getty@ttyGS0.service
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user