Use grep -F in dmesg filter to prevent interface name treated as regex
Lint / Python (flake8) (push) Successful in 38s
Lint / JS (eslint) (push) Failing after 13s
Security / Python Security (bandit) (push) Successful in 42s
Test / Python Tests (pytest) (push) Successful in 50s
Lint / Notify on failure (push) Successful in 2s
Lint / Deploy (push) Has been skipped
Lint / Python (flake8) (push) Successful in 38s
Lint / JS (eslint) (push) Failing after 13s
Security / Python Security (bandit) (push) Successful in 42s
Test / Python Tests (pytest) (push) Successful in 50s
Lint / Notify on failure (push) Successful in 2s
Lint / Deploy (push) Has been skipped
grep {iface} treats dots and other special chars as regex metacharacters.
Switch to grep -F -- {iface} for fixed-string matching and to prevent
a leading dash in the interface name from being parsed as a grep flag.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ class DiagnosticsRunner:
|
|||||||
f' echo "=== ip_route ===";'
|
f' echo "=== ip_route ===";'
|
||||||
f' ip route show dev {q} 2>/dev/null;'
|
f' ip route show dev {q} 2>/dev/null;'
|
||||||
f' echo "=== dmesg ===";'
|
f' echo "=== dmesg ===";'
|
||||||
f' dmesg 2>/dev/null | grep {q} | tail -50;'
|
f' dmesg 2>/dev/null | grep -F -- {q} | tail -50;'
|
||||||
f' echo "=== lldpctl ===";'
|
f' echo "=== lldpctl ===";'
|
||||||
f' lldpctl 2>/dev/null || echo "lldpd not running";'
|
f' lldpctl 2>/dev/null || echo "lldpd not running";'
|
||||||
f' echo "=== end ==="'
|
f' echo "=== end ==="'
|
||||||
|
|||||||
Reference in New Issue
Block a user