Dean Troyer cfe45dadae StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-01 07:45:23 -07:00

13 lines
425 B
Bash
Executable File

#!/bin/bash
# Renames interfaces to be sequential ethX interface names regardless of interface type
# This is required to avoid a kernel host patch that starts number at 1000 and to
# override slot specific naming for non-kernel interfaces.
# The ifindex for the first interface that is not 'lo' will be 2.
# Therefore adjust the numbering to start at 0 for eth0..ethN naming
INDEX=$(($IFINDEX-2))
echo "eth$INDEX"
exit 0