aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-19 06:46:29 +0000
committerRoy Marples <roy@marples.name>2007-04-19 06:46:29 +0000
commitf05ac25185ddcd4f84b35ff3ffdcc54a36bc6bd7 (patch)
treeb2babd7a02ed52e638f175bac60a6b6010382dd5
parentfb2f0495a6e25a304675412d9f635e73884e7c44 (diff)
Fix bridge some more, remove superflous warning from vewarn and error when no interface correctly
-rw-r--r--net.Linux/bridge.sh20
-rwxr-xr-xsh/net.sh6
-rw-r--r--src/libeinfo.c1
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);
}