#!/bin/sh # Copyright (c) 2016 Qualcomm Atheros, Inc. # # All Rights Reserved. # Qualcomm Atheros Confidential and Proprietary. logger -t hotplug-switch -p user.info "loop prevention acting on port $PORT $STATE" . /lib/functions/repacd-lp.sh case $EVENT in link) if [ $STATE = "up" ]; then lp_onlinkup $PORT elif [ $STATE = "down" ]; then lp_onlinkdown $PORT fi ;; direction) if [ $STATE = "downstream" ]; then lp_ondownstream $PORT elif [ $STATE = "upstream" ]; then lp_onupstream $PORT fi ;; net) ;; esac