Last active
December 16, 2024 06:38
-
-
Save missing233/1a82b65b66f5fffde5a44ba1c091d6ce to your computer and use it in GitHub Desktop.
bcm57810-ntt-sfp-onu-fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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