]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Use a better naming scheme for physical devices.
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 31 Dec 2016 14:04:05 +0000 (15:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 31 Dec 2016 14:05:56 +0000 (14:05 +0000)
Instead of orange0phys we should use orangephys0 this patch implements
the necessary changes.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/udev/network-hotplug-bridges
config/udev/network-hotplug-rename

index 514b45de128b99197fa22ebfa15022e665bbacaa..5144a7712d5fedc82e0cd482148e65c0ab79202b 100644 (file)
@@ -26,7 +26,8 @@
 eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
 
 detect_zone() {
-       local intf="${INTERFACE%0*}"
+       local intf="${INTERFACE%?}"
+       intf="${intf%phys}"
        intf="${intf^^}"
 
        local zone
index 294bb78625d74098b541eeac14e9b6f6074869a9..3a482d2dbff99615556bb7630f6b031b2918048c 100644 (file)
@@ -69,7 +69,7 @@ for zone in ${ZONES}; do
        # print the name to which udev will rename it.
        case "${!mode}" in
                bridge)
-                       echo "${!device}phys"
+                       echo "${!device%0}phys0"
                        ;;
 
                macvtap)
@@ -78,7 +78,7 @@ for zone in ${ZONES}; do
                                logger -t network "MACVTAP mode is not supported for wireless devices"
                                echo "${!device}"
                        else
-                               echo "${!device}phys"
+                               echo "${!device%0}phys0"
                        fi
                        ;;