summaryrefslogtreecommitdiffstats
path: root/debian/ethtool.if-pre-up
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:34:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:34:40 +0000
commit33c4f210569537fd8f6c097c56f3db565c2a771f (patch)
tree1c84e52b5d715ebba747a134fd2a55fc863c6a47 /debian/ethtool.if-pre-up
parentAdding upstream version 1:6.7. (diff)
downloadethtool-33c4f210569537fd8f6c097c56f3db565c2a771f.tar.xz
ethtool-33c4f210569537fd8f6c097c56f3db565c2a771f.zip
Adding debian version 1:6.7-1.debian/1%6.7-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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..6c1d5de
--- /dev/null
+++ b/debian/ethtool.if-pre-up
@@ -0,0 +1,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