summaryrefslogtreecommitdiffstats
path: root/debian/ethtool.if-pre-up
blob: 398adaeefe3c070879cd20e7784a8d2ac5615282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

ETHTOOL=/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