# 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/event.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 route add default gw `cat /etc/sysconfig/net/defaultrouter` status_message "Default Router set to `cat /etc/sysconfig/net/defaultrouter`" fi NUMIF=`ip -f inet addr show|grep inet|grep -v "host lo"|wc -l` if [ $NUMIF -gt 2 ]; then echo "1" >/proc/sys/net/ipv4/ip_forward status_message "Enable of ip_forwarding" fi fi end script