summaryrefslogtreecommitdiffstats
path: root/debian/ethtool.if-pre-up
diff options
context:
space:
mode:
Diffstat (limited to 'debian/ethtool.if-pre-up')
-rw-r--r--debian/ethtool.if-pre-up14
1 files changed, 14 insertions, 0 deletions
diff --git a/debian/ethtool.if-pre-up b/debian/ethtool.if-pre-up
new file mode 100644
index 0000000..398adae
--- /dev/null
+++ b/debian/ethtool.if-pre-up
@@ -0,0 +1,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