board/common: Keep static /etc/iproute2/group

This way we don't have to patch it at every boot.
This commit is contained in:
Tobias Waldekranz
2023-02-09 09:43:15 +01:00
parent fa4a83e38d
commit 437961a644
2 changed files with 2 additions and 9 deletions
+2
View File
@@ -0,0 +1,2 @@
1 port
2 iface
-9
View File
@@ -29,15 +29,6 @@ for netif in /sys/class/net/*; do
num=$((num + 1))
done
# Verify that the 'port' and 'iface' groups exists
[ -d /etc/iproute2 ] || mkdir -p /etc/iproute2
if ! grep -q port /etc/iproute2/group; then
echo "1 port" >> /etc/iproute2/group
fi
if ! grep -q iface /etc/iproute2/group; then
echo "2 iface" >> /etc/iproute2/group
fi
# Find and mark all switch ports
ports=$(devlink port 2>/dev/null | awk '/flavour physical/{print $5}')
for iface in $ports; do