Skip to content

Instantly share code, notes, and snippets.

@missing233
Last active December 16, 2024 06:38
Show Gist options
  • Save missing233/1a82b65b66f5fffde5a44ba1c091d6ce to your computer and use it in GitHub Desktop.
Save missing233/1a82b65b66f5fffde5a44ba1c091d6ce to your computer and use it in GitHub Desktop.
bcm57810-ntt-sfp-onu-fix
#!/bin/sh /etc/rc.common
INTERFACE="eth4"
START=99
start() {
count=0
while [ ! -e /sys/class/net/$INTERFACE ] && [ $count -lt 30 ]; do
sleep 1
count=$((count + 1))
done
if [ -e /sys/class/net/$INTERFACE ]; then
ethtool -s $INTERFACE speed 1000 duplex full autoneg off
ip link set $INTERFACE up
logger "[stick_onu] set $INTERFACE port to 1Gbps"
else
logger "[stick_onu] $INTERFACE not found"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment