summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2024-03-01 15:23:02 +0100
committerSimon Rettberg2024-03-01 15:23:02 +0100
commit1a325320cd1918ef0596e7cda5af0613633ac968 (patch)
treea1f36405af9c512f92e14b7c5a3cf72cac8192a7 /core
parent[vmware-version-check/nvidia-libs@] Silence non-critical errors in addon-requ... (diff)
downloadmltk-1a325320cd1918ef0596e7cda5af0613633ac968.tar.gz
mltk-1a325320cd1918ef0596e7cda5af0613633ac968.tar.xz
mltk-1a325320cd1918ef0596e7cda5af0613633ac968.zip
[etherwake] udev: Mask exit code 76 from ethtool
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/etherwake/data/opt/openslx/scripts/udev-disable_pause_frames7
-rw-r--r--core/modules/etherwake/templates/99-enable-wol-disable-pause.rules4
2 files changed, 9 insertions, 2 deletions
diff --git a/core/modules/etherwake/data/opt/openslx/scripts/udev-disable_pause_frames b/core/modules/etherwake/data/opt/openslx/scripts/udev-disable_pause_frames
new file mode 100755
index 00000000..f5d3ba3a
--- /dev/null
+++ b/core/modules/etherwake/data/opt/openslx/scripts/udev-disable_pause_frames
@@ -0,0 +1,7 @@
+#!/bin/ash
+
+# Hide exit code to avoid udev spam
+ethtool -A "$1" autoneg off rx off tx off
+ret=$?
+[ "$ret" = 76 ] && exit 0
+exit "$ret"
diff --git a/core/modules/etherwake/templates/99-enable-wol-disable-pause.rules b/core/modules/etherwake/templates/99-enable-wol-disable-pause.rules
index 719d872b..cdcc261c 100644
--- a/core/modules/etherwake/templates/99-enable-wol-disable-pause.rules
+++ b/core/modules/etherwake/templates/99-enable-wol-disable-pause.rules
@@ -1,5 +1,5 @@
# Enable WOL on boot NIC
ACTION=="add", SUBSYSTEM=="net", NAME=="eth0", RUN+="%ETHTOOL% -s $name wol g"
ACTION=="add", SUBSYSTEM=="net", NAME=="boot0", RUN+="%ETHTOOL% -s $name wol g"
-# Disaable pause frames on any adapter found
-ACTION=="add", SUBSYSTEM=="net", RUN+="%ETHTOOL% -A $name autoneg off rx off tx off"
+# Disable pause frames on any adapter found
+ACTION=="add", SUBSYSTEM=="net", RUN+="/opt/openslx/scripts/udev-disable_pause_frames $name"