diff -Nur -x '*.orig' -x '*.rej' smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge mezzanine_patched_smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge --- smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge 2009-01-12 13:23:55.000000000 +0100 +++ mezzanine_patched_smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge 2009-01-12 13:07:26.000000000 +0100 @@ -13,6 +13,8 @@ # for example tap="tap0 tap1 tap2". # Defaults is tap0 TAP_IF=$(/sbin/e-smith/db configuration getprop bridge tapInterface) +# Replace ; and , with spaces +TAP_IF=$(echo $TAP_IF | sed -e "s/[,;]/ /g") # Define physical ethernet interface to be bridged # with TAP interface(s) above. @@ -45,7 +47,7 @@ # Sub to reconfigure the firewall firewall(){ - /sbin/e-smith/expand-template /etc/rc.d/init.d/masq + /sbin/e-smith/expand-template /etc/rc.d/init.d/masq >/dev/null 2>&1 /sbin/service masq restart >/dev/null 2>&1 } @@ -62,14 +64,14 @@ if (! test $SYSTEM); then NETMASK=$(/sbin/e-smith/db networks getprop $NET Mask) ROUTER=$(/sbin/e-smith/db networks getprop $NET Router) - /sbin/route add -net $NET netmask $NETMASK gw $ROUTER + /sbin/route add -net $NET netmask $NETMASK gw $ROUTER >/dev/null 2>&1 fi done # If the server runs in serveronly, we need to reconfigure the default gateway: if [ $MODE == 'serveronly' ]; then GW=$(/sbin/e-smith/db configuration get GatewayIP) - /sbin/route add default gw $GW + /sbin/route add default gw $GW >/dev/null 2>&1 fi } @@ -80,19 +82,19 @@ # Then, create the tap interface(s) and enslave it in the bridge one for t in $TAP_IF; do $openvpn --mktun --dev $t >/dev/null 2>&1 - /sbin/ifconfig $t 0.0.0.0 promisc up - /usr/sbin/brctl addif $BRIDGE_IF $t + /sbin/ifconfig $t 0.0.0.0 promisc up >/dev/null 2>&1 + /usr/sbin/brctl addif $BRIDGE_IF $t >/dev/null 2>&1 done # Now make the real ethernet interface promiscuous - /sbin/ifconfig $ETH_IF 0.0.0.0 promisc up + /sbin/ifconfig $ETH_IF 0.0.0.0 promisc up >/dev/null 2>&1 # And add it to the bridge - /usr/sbin/brctl addif $BRIDGE_IF $ETH_IF + /usr/sbin/brctl addif $BRIDGE_IF $ETH_IF >/dev/null 2>&1 # Now configure the LocalIP on the bridge interface /sbin/e-smith/db configuration setprop InternalInterface Name $BRIDGE_IF - /sbin/ifconfig $BRIDGE_IF $ETH_IP netmask $ETH_MASK + /sbin/ifconfig $BRIDGE_IF $ETH_IP netmask $ETH_MASK >/dev/null 2>&1 # Push the routes for the new interface routes @@ -107,17 +109,17 @@ stop(){ # Shutdown the bridge and remove it - /sbin/ifconfig $BRIDGE_IF down - /usr/sbin/brctl delbr $BRIDGE_IF + /sbin/ifconfig $BRIDGE_IF down >/dev/null 2>&1 + /usr/sbin/brctl delbr $BRIDGE_IF >/dev/null 2>&1 # Then delete each tap interfaces for t in $TAP_IF; do - $openvpn --rmtun --dev $t >/dev/null 2>&1 + $openvpn --rmtun --dev $t >/dev/null 2>&1 done # Reconfigure the ethernet interface /sbin/e-smith/db configuration setprop InternalInterface Name $ETH_IF - /sbin/ifconfig $ETH_IF $ETH_IP netmask $ETH_MASK up -promisc + /sbin/ifconfig $ETH_IF $ETH_IP netmask $ETH_MASK up -promisc >/dev/null 2>&1 # Push the routes routes