aboutsummaryrefslogtreecommitdiff
path: root/straper/db/public/network/etc-network/if-pre-up.d/ethtool
blob: 6c1d5de0aaf4b57456f8e3e2eb9dc428909a8406 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

ETHTOOL=/usr/sbin/ethtool

test -x $ETHTOOL || exit 0

[ "$IFACE" != "lo" ] || exit 0

# Gather together the mixed bag of settings applied with -s/--change
SETTINGS="\
${IF_ETHERNET_PORT:+ port $IF_ETHERNET_PORT}\
${IF_DRIVER_MESSAGE_LEVEL:+ msglvl $IF_DRIVER_MESSAGE_LEVEL}\
"
[ -z "$SETTINGS" ] || $ETHTOOL --change "$IFACE" $SETTINGS