mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
board/common: Keep static /etc/iproute2/group
This way we don't have to patch it at every boot.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
1 port
|
||||
2 iface
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user