Fix bridge some more, remove superflous warning from vewarn and error when no interface correctly

This commit is contained in:
Roy Marples 2007-04-19 06:46:29 +00:00
parent fb2f0495a6
commit f05ac25185
3 changed files with 16 additions and 11 deletions

View File

@ -38,17 +38,17 @@ bridge_pre_start() {
eend 1 eend 1
return 1 return 1
fi fi
eval set -- ${opts}
for x in "$@" ; do
case " ${x} " in
*" ${IFACE} "*) ;;
*) x="${x} ${IFACE}" ;;
esac
brctl ${x}
done
fi fi
eval $(_get_array "brctl_${IFVAR}")
for x in "$@" ; do
set -- ${x}
x=$1
shift
set -- "${x}" "${IFACE}" "$@"
brctl "$@"
done
if [ -n "${ports}" ] ; then if [ -n "${ports}" ] ; then
einfo "Adding ports to ${IFACE}" einfo "Adding ports to ${IFACE}"
eindent eindent
@ -66,7 +66,7 @@ bridge_pre_start() {
done done
eoutdent eoutdent
fi fi
) ) || return 1
# Bring up the bridge # Bring up the bridge
_up _up

View File

@ -394,6 +394,12 @@ start() {
fi fi
done 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 ! _wait_for_carrier ; then
if service_started devd ; then if service_started devd ; then
ewarn "no carrier, but devd will start us when we have one" ewarn "no carrier, but devd will start us when we have one"

View File

@ -861,7 +861,6 @@ int ewarnv (const char *fmt, ...)
retval += printf ("\n"); retval += printf ("\n");
} }
va_end (ap); va_end (ap);
retval += printf ("\n");
return (retval); return (retval);
} }