#!/bin/sh
boxtype=`cat /proc/stb/info/boxtype`
if ! [ -f /lib/firmware/avrmain-$boxtype.hex ]; then
    exit 0
fi
if ! [ -x /usr/bin/fpupdate ]; then
    exit 0
fi
/usr/bin/fpupdate /lib/firmware/avrmain-$boxtype.hex 15 && rm /lib/firmware/avrmain*.hex
