diff options
Diffstat (limited to 'net-scripts/net.modules.d/bridge')
-rw-r--r-- | net-scripts/net.modules.d/bridge | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net-scripts/net.modules.d/bridge b/net-scripts/net.modules.d/bridge index 6780a18..6c77067 100644 --- a/net-scripts/net.modules.d/bridge +++ b/net-scripts/net.modules.d/bridge @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2004-2005 Gentoo Foundation +# Copyright (c) 2004-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Contributed by Roy Marples (uberlord@gentoo.org) @@ -131,22 +131,24 @@ bridge_pre_start() { if [[ -z ${!ports} && -n ${!briface} ]]; then ports="${iface}" iface="${!briface}" + else + ports="${!ports}" fi # Create the bridge if needed bridge_exists "${iface}" || bridge_create "${iface}" - if [[ -n ${!ports} ]]; then + if [[ -n ${ports} ]]; then einfo "Adding ports to ${iface}" eindent - for i in ${!ports}; do + for i in ${ports}; do interface_exists "${i}" && continue eerror "interface ${i} does not exist" return 1 done - for i in ${!ports}; do + for i in ${ports}; do ebegin "${i}" bridge_add_port "${iface}" "${i}" eend $? || return 1 |