From f05ac25185ddcd4f84b35ff3ffdcc54a36bc6bd7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 19 Apr 2007 06:46:29 +0000 Subject: Fix bridge some more, remove superflous warning from vewarn and error when no interface correctly --- net.Linux/bridge.sh | 20 ++++++++++---------- sh/net.sh | 6 ++++++ src/libeinfo.c | 1 - 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/net.Linux/bridge.sh b/net.Linux/bridge.sh index a97e525a..a6913fd9 100644 --- a/net.Linux/bridge.sh +++ b/net.Linux/bridge.sh @@ -38,17 +38,17 @@ bridge_pre_start() { eend 1 return 1 fi - - eval set -- ${opts} - for x in "$@" ; do - case " ${x} " in - *" ${IFACE} "*) ;; - *) x="${x} ${IFACE}" ;; - esac - brctl ${x} - done fi + eval $(_get_array "brctl_${IFVAR}") + for x in "$@" ; do + set -- ${x} + x=$1 + shift + set -- "${x}" "${IFACE}" "$@" + brctl "$@" + done + if [ -n "${ports}" ] ; then einfo "Adding ports to ${IFACE}" eindent @@ -66,7 +66,7 @@ bridge_pre_start() { done eoutdent fi - ) + ) || return 1 # Bring up the bridge _up diff --git a/sh/net.sh b/sh/net.sh index 33b93fcb..9922c7ab 100755 --- a/sh/net.sh +++ b/sh/net.sh @@ -394,6 +394,12 @@ start() { fi done + if ! _exists ; then + eerror "ERROR: interface ${IFACE} does not exist" + eerror "Ensure that you have loaded the correct kernel module for your hardware" + return 1 + fi + if ! _wait_for_carrier ; then if service_started devd ; then ewarn "no carrier, but devd will start us when we have one" diff --git a/src/libeinfo.c b/src/libeinfo.c index c2ae9715..9355021c 100644 --- a/src/libeinfo.c +++ b/src/libeinfo.c @@ -861,7 +861,6 @@ int ewarnv (const char *fmt, ...) retval += printf ("\n"); } va_end (ap); - retval += printf ("\n"); return (retval); } -- cgit v1.2.3