ifupdown-ng/executor-scripts/linux/ethtool
2020-09-21 08:20:43 -06:00

13 lines
280 B
Bash
Executable file

#!/bin/sh
set -e
case "$PHASE" in
pre-up)
settings=
[ -n "$IF_ETHTOOL_ETHERNET_PORT" ] && settings="port $IF_ETHTOOL_ETHERNET_PORT"
[ -n "$IF_ETHTOOL_MSGLVL" ] && settings="msglvl $IF_ETHTOOL_MSGLVL"
[ -z "$settings" ] || ethtool --change "$IFACE" $settings
;;
up)
;;
esac