[no ci] General: add debug messages to datalink console setup

pull/1398/head
Viktor 2024-04-12 14:07:11 +02:00
parent c3a69061ae
commit e9cf0d9e6f
1 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
chip=$(ipcinfo -c) chip=$(ipcinfo -c)
skip=$(fw_printenv -n fpv)
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2) fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
if [ -e /etc/datalink.conf ]; then if [ -e /etc/datalink.conf ]; then
@ -9,10 +8,13 @@ fi
case "$1" in case "$1" in
start) start)
if [ "$skip" = "true" ]; then if [ "$(fw_printenv -n fpv)" = "false" ]; then
sed -i "s/console/#console/g" /etc/inittab if grep -q "#console" /etc/inittab; then
elif [ "$skip" = "false" ]; then echo "Restart system to restore console..."
sed -i "s/#console/console/g" /etc/inittab sed -i "s/#console/console/g" /etc/inittab
rm -f /etc/system.ok
reboot
fi
exit 0 exit 0
fi fi