2f620d58be
git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_upstartaddon@5933 504e572c-2e33-0410-9681-be2bf7408885
27 lines
523 B
Plaintext
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
|
|
|