From 34a07d25401363b487e383e90c0bb7c5f7bda0c9 Mon Sep 17 00:00:00 2001 From: segfault Date: Thu, 15 Aug 2024 23:50:15 +0200 Subject: [PATCH] Fix command to extract network interface names `ip link` displays pairs of virtual interfaces like this: 1: veth1@veth0: [...] 2: veth0@veth1: [...] `ethtool` can only show information for `veth0`, not `veth1@veth0`, so we adapt the command to only return the `veth0` part. --- config/chroot_local-includes/usr/local/lib/tails-spoof-mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/chroot_local-includes/usr/local/lib/tails-spoof-mac b/config/chroot_local-includes/usr/local/lib/tails-spoof-mac index 8fb39fca188..7fd449f4529 100755 --- a/config/chroot_local-includes/usr/local/lib/tails-spoof-mac +++ b/config/chroot_local-includes/usr/local/lib/tails-spoof-mac @@ -108,7 +108,7 @@ mac_spoof_panic() { is_wired=true fi - interfaces=$(ip link show | awk -F: '/^[0-9]+: [a-z]/ {print $2}' | tr -d ' ') + interfaces=$(ip link show | grep -o "^[0-9]\+: \w\+" | awk -F': ' '{print $2}') # Check if there are other WiFi or wired cards local other_wifi_cards other_wired_cards -- 2.11.4.GIT