iopsys-feed/dectmngr2/files/etc/uci-defaults/22-dect-defaults
2020-01-23 14:39:32 +01:00

23 lines
451 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.has_dect=1
commit hw.board
EOT
fi
fi
exit 0