/[smecontribs]/rpms/smeserver-bridge-interface/contribs8/smeserver-bridge-interface-0.1-init_script.patch
ViewVC logotype

Annotation of /rpms/smeserver-bridge-interface/contribs8/smeserver-bridge-interface-0.1-init_script.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Feb 12 03:46:04 2013 UTC (11 years, 9 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-bridge-interface-0_1-6_el5_sme, HEAD
Initial import

1 unnilennium 1.1 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
2     --- smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge 2009-01-12 13:23:55.000000000 +0100
3     +++ mezzanine_patched_smeserver-bridge-interface-0.1/root/etc/rc.d/init.d/bridge 2009-01-12 13:07:26.000000000 +0100
4     @@ -13,6 +13,8 @@
5     # for example tap="tap0 tap1 tap2".
6     # Defaults is tap0
7     TAP_IF=$(/sbin/e-smith/db configuration getprop bridge tapInterface)
8     +# Replace ; and , with spaces
9     +TAP_IF=$(echo $TAP_IF | sed -e "s/[,;]/ /g")
10    
11     # Define physical ethernet interface to be bridged
12     # with TAP interface(s) above.
13     @@ -45,7 +47,7 @@
14    
15     # Sub to reconfigure the firewall
16     firewall(){
17     - /sbin/e-smith/expand-template /etc/rc.d/init.d/masq
18     + /sbin/e-smith/expand-template /etc/rc.d/init.d/masq >/dev/null 2>&1
19     /sbin/service masq restart >/dev/null 2>&1
20     }
21    
22     @@ -62,14 +64,14 @@
23     if (! test $SYSTEM); then
24     NETMASK=$(/sbin/e-smith/db networks getprop $NET Mask)
25     ROUTER=$(/sbin/e-smith/db networks getprop $NET Router)
26     - /sbin/route add -net $NET netmask $NETMASK gw $ROUTER
27     + /sbin/route add -net $NET netmask $NETMASK gw $ROUTER >/dev/null 2>&1
28     fi
29     done
30    
31     # If the server runs in serveronly, we need to reconfigure the default gateway:
32     if [ $MODE == 'serveronly' ]; then
33     GW=$(/sbin/e-smith/db configuration get GatewayIP)
34     - /sbin/route add default gw $GW
35     + /sbin/route add default gw $GW >/dev/null 2>&1
36     fi
37     }
38    
39     @@ -80,19 +82,19 @@
40     # Then, create the tap interface(s) and enslave it in the bridge one
41     for t in $TAP_IF; do
42     $openvpn --mktun --dev $t >/dev/null 2>&1
43     - /sbin/ifconfig $t 0.0.0.0 promisc up
44     - /usr/sbin/brctl addif $BRIDGE_IF $t
45     + /sbin/ifconfig $t 0.0.0.0 promisc up >/dev/null 2>&1
46     + /usr/sbin/brctl addif $BRIDGE_IF $t >/dev/null 2>&1
47     done
48    
49     # Now make the real ethernet interface promiscuous
50     - /sbin/ifconfig $ETH_IF 0.0.0.0 promisc up
51     + /sbin/ifconfig $ETH_IF 0.0.0.0 promisc up >/dev/null 2>&1
52    
53     # And add it to the bridge
54     - /usr/sbin/brctl addif $BRIDGE_IF $ETH_IF
55     + /usr/sbin/brctl addif $BRIDGE_IF $ETH_IF >/dev/null 2>&1
56    
57     # Now configure the LocalIP on the bridge interface
58     /sbin/e-smith/db configuration setprop InternalInterface Name $BRIDGE_IF
59     - /sbin/ifconfig $BRIDGE_IF $ETH_IP netmask $ETH_MASK
60     + /sbin/ifconfig $BRIDGE_IF $ETH_IP netmask $ETH_MASK >/dev/null 2>&1
61    
62     # Push the routes for the new interface
63     routes
64     @@ -107,17 +109,17 @@
65    
66     stop(){
67     # Shutdown the bridge and remove it
68     - /sbin/ifconfig $BRIDGE_IF down
69     - /usr/sbin/brctl delbr $BRIDGE_IF
70     + /sbin/ifconfig $BRIDGE_IF down >/dev/null 2>&1
71     + /usr/sbin/brctl delbr $BRIDGE_IF >/dev/null 2>&1
72    
73     # Then delete each tap interfaces
74     for t in $TAP_IF; do
75     - $openvpn --rmtun --dev $t >/dev/null 2>&1
76     + $openvpn --rmtun --dev $t >/dev/null 2>&1
77     done
78    
79     # Reconfigure the ethernet interface
80     /sbin/e-smith/db configuration setprop InternalInterface Name $ETH_IF
81     - /sbin/ifconfig $ETH_IF $ETH_IP netmask $ETH_MASK up -promisc
82     + /sbin/ifconfig $ETH_IF $ETH_IP netmask $ETH_MASK up -promisc >/dev/null 2>&1
83    
84     # Push the routes
85     routes

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed