set -e
. /usr/share/debconf/confmodule
if [ ! "$DEBIAN_FRONTEND" = "noninteractive" ]; then
if [ -e /proc/device-tree/model ]
then
MODEL="$(cat /proc/device-tree/model)"
else
MODEL="UNKNOWN"
fi
ISBLACK=false
ISBLUE=false
ISCAPE=false
if [ "$MODEL" = "TI AM335x BeagleBone Blue" ]; then
ISBLUE=true
elif [ "$MODEL" = "TI AM335x BeagleBone Black" ]; then
ISBLACK=true
elif [ "$MODEL" = "TI AM335x BeagleBone Black Wireless" ]; then
ISBLACK=true
elif [ "$MODEL" = "TI AM335x BeagleBone Black RoboticsCape" ]; then
ISCAPE=true
elif [ "$MODEL" = "TI AM335x BeagleBone Black Wireless RoboticsCape" ]; then
ISCAPE=true
fi
if [ "$ISBLACK" = "true" ]; then
db_input medium librobotcontrol/q_enable_dt || true
db_go || true
fi
db_get librobotcontrol/q_enable_dt || true
if [ "$RET" = "true" ]; then ISCAPE=true; fi
db_input medium librobotcontrol/q_runonboot || true
db_go || true
fi