Viitor_upstartaddon/etc/event.d/routed
kueller 16d2aaadde V962 Branch
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstartaddon@4446 504e572c-2e33-0410-9681-be2bf7408885
2008-05-03 17:03:02 +00:00

27 lines
523 B
Plaintext

# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on stopped routing
stop on stopping ifup
console logged
script
source /etc/init.d/functions
if [ ! -f /usr/sbin/routed ]; then
exit 0
fi
if [ ! -f /etc/sysconfig/net/notrouter ]; then
NUMIF=`ip -f inet addr show|grep inet|wc -l`
if [ $NUMIF -gt 2 ]; then
ROUTEOPTIONS="-s -g"
fi
else
ROUTEOPTIONS="-q"
fi
/usr/sbin/routed -d $ROUTEOPTIONS
end script