/[pearpc]/scripts/ifppc_up
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /scripts/ifppc_up

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Wed Sep 5 17:11:21 2007 UTC (14 years, 1 month ago) by dpavlin
File size: 1000 byte(s)
import upstream CVS
1 dpavlin 1 #
2     # BE CAREFUL. THIS SCRIPT IS INVOKED BY A SETUID ROOT BINARY!
3     # IT SHOULD BE OWNED BY ROOT.
4     # ONLY ROOT SHOULD HAVE WRITE-ACCESS TO THIS FILE.
5     #
6     echo UID=$UID
7    
8     . ./scripts/settings
9    
10     #if [ $BRIDGE ]; then
11     # touch $PPC_INTERFACE.active
12     # ifconfig $BRIDGE_INTERFACE 1>/dev/null 2>&1
13     # if [ $? != 0 ]; then
14     # ifconfig $HOST_INTERFACE 0.0.0.0
15     # ifconfig $PPC_INTERFACE 0.0.0.0
16     # brctl addbr $BRIDGE_INTERFACE
17     # brctl addif $BRIDGE_INTERFACE $HOST_INTERFACE
18     # brctl addif $BRIDGE_INTERFACE $PPC_INTERFACE
19     # ifconfig $BRIDGE_INTERFACE $HOST_IP netmask $HOST_NETMASK up
20     # route add -net default gw $HOST_DEFAULT_ROUTER
21     # else
22     # ifconfig $PPC_INTERFACE 0.0.0.0
23     # brctl addif $BRIDGE_INTERFACE $PPC_INTERFACE
24     # fi
25     #else
26     PPC_NETMASK="255.255.255.0"
27     PPC_HOST_IP="192.168.1.80"
28     PPC_CLIENT_IP="192.168.1.1"
29     /sbin/ifconfig $PPC_INTERFACE $PPC_HOST_IP netmask $PPC_NETMASK up &&\
30     /sbin/iptables -t nat -s $PPC_CLIENT_IP -A POSTROUTING -j MASQUERADE &&\
31     echo 1 > /proc/sys/net/ipv4/ip_forward
32     #fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26