1 # hdw - linux /etc/conf/network
3 # defining {start,stop}_net functions used by /etc/init.d/network
4 # (copied from ROCK Linux + some additions)
10 IPADDR_0="192.168.10.20"
11 NETMASK_0="255.255.255.0"
12 GATEWAY_0="192.168.10.10"
16 # start and stop functions (called by /etc/init.d/network)
19 xx() { echo ">> $*" ; eval "$*" ; }
22 if [ ".$DHCP" = ".on" ] ; then
23 echo "starting dhclient."
24 /usr/sbin/dhclient -q $IF_0
26 echo "setting up network ..."
28 # xx iptables -A chain rule-specification [options]
29 # xx echo 1 '>' /proc/sys/net/ipv4/ip_forward
30 xx ifconfig $IF_0 $IPADDR_0 netmask $NETMASK_0 up # $OPTIONS_0
31 xx route add default gw $GATEWAY_0 dev $IF_0
34 [ -f /etc/setkey.conf -a -f /usr/sbin/setkey ] &&
35 xx /usr/sbin/setkey -f /etc/setkey.conf
39 if [ ".$DHCP" = ".on" ] ; then
40 echo "stopping dhclient."
41 killall -15 /usr/sbin/dhclient
44 echo "shutting down network ..."
45 xx route del default gw $GATEWAY_0 dev $IF_0
46 xx ifconfig $IF_0 down
47 # xx echo 0 '>' /proc/sys/net/ipv4/ip_forward
48 # xx iptables -D chain rule-specification [options]