# rc - runlevel compatibility # # This task guesses what the "default runlevel" should be and starts the # appropriate script. start on started ifup console logged script source /etc/init.d/functions if [ ! -f /etc/sysconfig/net/notrouter ]; then echo "Configuring System with routing allowed" if [ -f /etc/sysconfig/net/gateways ]; then sed -e "/^#/d" /etc/sysconfig/net/gateways | \ sed -e "/^ *$/d" >/tmp/gateways exec 3&- rm /tmp/gateways fi if [ -f /etc/sysconfig/net/defaultrouter ]; then echo -n "setting up defaultrouter `cat /etc/sysconfig/net/defaultrouter`" $DEBUG route add default gw `cat /etc/sysconfig/net/defaultrouter` evaluate_retval fi NUMIF=`ip -f inet addr show|grep inet|wc -l` if [ $NUMIF -gt 2 ]; then echo -n "Enable ip_forwarding" echo "1" >/proc/sys/net/ipv4/ip_forward evaluate_retval fi fi end script