#!/bin/sh

. /usr/local/bin/sig_catcher

force_read=$1

if [ "$force_read" != "-f" ]; then
    if [ -f /var/run/switch_version_controller ]; then
        cat /var/run/switch_version_controller
        exit 0
    fi
fi

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

if [ "$platform" == "RazorL" ] && [ "$brdrev" -lt "$razorl_rev_p2i" ] ; then
    echo "Command not applicable for RazorL pre-p2i motherboards"
else
    switch ep_version
fi
