Magicsee N5 Max X4

Search the forum:

It is already “0” so it might need to be “1”:

#!/bin/bash
GPIO=`fdtget -t x /flash/dtb.img /gpioleds/sys_led gpios`
GPIO_ACTIVE_FLAG=`echo $GPIO| awk 'END {print $NF}'`
if [[ "$GPIO_ACTIVE_FLAG" == "1" ]]; then
  echo "SYSTEM LED GPIO IS CORRECT"
  exit 0
else
  echo "Changing System Led GPIO_ACTIVE flag"
  GP=`echo $GPIO | sed '$s/\w*$//'`
  GPIO=$GP"1"
  mount -o remount,rw /flash
  fdtput -t x /flash/dtb.img /gpioleds/sys_led gpios $GPIO
  sync
  mount -o remount,ro /flash
fi