diff options
author | Roy Marples <roy@marples.name> | 2007-04-19 06:46:29 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-19 06:46:29 +0000 |
commit | f05ac25185ddcd4f84b35ff3ffdcc54a36bc6bd7 (patch) | |
tree | b2babd7a02ed52e638f175bac60a6b6010382dd5 | |
parent | fb2f0495a6e25a304675412d9f635e73884e7c44 (diff) |
Fix bridge some more, remove superflous warning from vewarn and error when no interface correctly
-rw-r--r-- | net.Linux/bridge.sh | 20 | ||||
-rwxr-xr-x | sh/net.sh | 6 | ||||
-rw-r--r-- | 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 @@ -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); } |