You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
527 B
Bash
29 lines
527 B
Bash
#!/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
|