]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
AWS: Rename network interfaces only when necessary
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Jul 2018 10:44:14 +0000 (11:44 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Jul 2018 10:44:14 +0000 (11:44 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/helper/aws-setup

index 6fe852cf8da110cc10eb97e83b5f200c9050867e..1a952e8a2f471e24503fc108bb5a07d01e131da6 100644 (file)
@@ -201,7 +201,7 @@ import_aws_configuration() {
                # Rename interface
                local interface="$(find_interface "${mac}")"
 
-               if [ -n "${interface}" ] && [ -n "${interface_name}" ]; then
+               if [ -n "${interface}" ] && [ -n "${interface_name}" ] && [ "${interface}" != "${interface_name}" ]; then
                        ip link set "${interface}" down
                        ip link set "${interface}" name "${interface_name}"
                fi