13 lines
425 B
Bash
Executable File
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
|