Created
July 19, 2019 16:44
-
-
Save sailfish009/0446a1375c222454825b2ed16d2d51c0 to your computer and use it in GitHub Desktop.
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 | |
### BEGIN INIT INFO | |
# Provides: pm-e1000e-fix | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 6 | |
# Short-Description: workaround for e1000e issue | |
# Description: e1000e fix | |
### END INIT INFO | |
################################################################################ | |
# Give Usage Information # | |
################################################################################ | |
usage() { | |
echo "Usage: $0 start|restart" >&2 | |
exit 1 | |
} | |
################################################################################ | |
# E X E C U T I O N B E G I N S H E R E # | |
################################################################################ | |
command="$1" | |
shift | |
interface="eth0" | |
case "$command" in | |
start) | |
ethtool -K "$interface" gso off gro off tso off | |
;; | |
restart) | |
ethtool -K "$interface" gso off gro off tso off | |
;; | |
*) | |
usage | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment