#!/bin/sh

. /usr/local/bin/sig_catcher

platform=$(cat /var/run/platform)
brdrev=$(cat /var/run/boardrev)
razorl_rev_p2i=3

if [ -f /var/run/RazorL ] && [ "$brdrev" -lt "$razorl_rev_p2i" ] ; then
        echo "Request not applicable on this platform (mobo = $brdrev)"
        exit 0
fi

switch_file=$(ls /firmware/$platform/switch/controller_switch_img*.txt)
if [ -f "$switch_file" ]; then
    switch ep_verify < $switch_file
else
    echo "$switch_file cannot be found."
fi
exit 0

