iopsys-feed/dectmngr2/files/etc/uci-defaults/22-dect-defaults
Ronny Nilsson 38916c8bfd dect: Workaround for product DG400 which has an
incorrect value in nvram from factory.
2019-01-15 16:44:08 +01:00

23 lines
450 B
Bash
Executable file

#!/bin/sh
# Workaround for product DG400 which has an
# incorrect value in nvram from factory.
if [ -e "/proc/nvram/BoardId" ]; then
boardid=$(cat /proc/nvram/BoardId)
ulBoardStuffOption=$(cat /proc/nvram/ulBoardStuffOption)
if [ "$boardid" = "DG400R0" -a "$ulBoardStuffOption" = "0xffffffff" ]; then
echo "0xfffffff2" >/proc/nvram/ulBoardStuffOption
db -q batch <<-EOT
set hw.board.hasDect=1
commit hw.board
EOT
fi
fi
exit 0