#! /bin/sh # /etc/rcS.d/10network # # Bring up the network and interfaces. [ -f /etc/config/network ] && . /etc/config/network # Setting the hostname if [ -n "$HOSTNAME" ]; then echo "Setting hostname...." hostname $HOSTNAME export HOSTNAME fi # Setting forwarding and defrag if [ -f /proc/sys/net/ipv4/ip_forward ]; then if [ "$FORWARD_IPV4" = "no" ]; then value=0 message="disabled" else value=1 message="enabled" fi echo "$value" > /proc/sys/net/ipv4/ip_forward echo "IPv4 packet forwarding is ${message}...." fi if [ -f /proc/sys/net/ipv4/ip_always_defrag ]; then if [ "$DEFRAG_IPV4" = "yes" ]; then value=1 message="enabled" else value=0 message="disabled" fi echo "$value" > /proc/sys/net/ipv4/ip_always_defrag echo "IPv4 automatic defragmentation is ${message}...." fi ifup -a touch /var/lock/subsys/network exit 0