#!/bin/sh

CMD="$1"
PORT="$2"

echo "delos-fwknopd: $CMD $PORT" > /dev/console

if [ "$CMD" = "open" ]; then
    case "$PORT" in
        1000)
            echo "delos-fwknopd: reboot and load firmware via TFTP" > /dev/console
            fw_setenv FwBootSource TFTP
            reboot
            ;;
    esac
fi
