This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 593de24f30c926af67a62cb2031258c7dad827a3 (commit) via c2336f6bed09b221dba0cf9e9025690568c2ff6a (commit) from 18b6da69b6e8ecddf86d0f824a28b0f3e37df2cb (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 593de24f30c926af67a62cb2031258c7dad827a3 Author: Jonatan Schlag jonatan.schlag@ipfire.org Date: Sat Dec 31 15:04:05 2016 +0100
Use a better naming scheme for physical devices.
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
commit c2336f6bed09b221dba0cf9e9025690568c2ff6a Author: Jonatan Schlag jonatan.schlag@ipfire.org Date: Sat Dec 31 15:03:32 2016 +0100
Use MAC addresses to define a slave
It is now also possible to use the MAC address to define a slave of a bridge. Simply add the mac address to the ZONE_SLAVES=''.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/udev/network-hotplug-bridges | 7 +++++-- config/udev/network-hotplug-rename | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-)
Difference in files: diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index ff6d20a..5144a77 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -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 @@ -40,7 +41,9 @@ detect_zone() { # Try to find out if this INTERFACE is a slave of a zone local slave for slave in $(get_value "${zone}_SLAVES"); do - if [ "${INTERFACE}" = "${slave}" ]; then + + #Compare if the mac address matches or if the name matches + if ([ "$(</sys/class/net/${INTERFACE}/address)" = "${slave}" ] || [ "${INTERFACE}" = "${slave}" ]); then echo "${zone}" return 0 fi diff --git a/config/udev/network-hotplug-rename b/config/udev/network-hotplug-rename index 294bb78..3a482d2 100644 --- a/config/udev/network-hotplug-rename +++ b/config/udev/network-hotplug-rename @@ -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 ;;
hooks/post-receive -- IPFire 2.x development tree