File: //proc/thread-self/root/etc.defaults/init/network.conf
description "add network device"
start on network-starting
emits network-interface-add
emits network-interface-up # only for dhcp interface
task
env PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
script
ARP_IGNORE=`/bin/get_key_value /etc/synoinfo.conf arp_ignore` || true
if [ "x$ARP_IGNORE" = "xyes" ]; then
echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore || true
else
echo 0 > /proc/sys/net/ipv4/conf/all/arp_ignore || true
fi
if [ -x /etc/rc.network -a "${NETWORKING}" = "yes" ]; then
CFGEN_NETWORK="/usr/syno/bin/synochecknetworkcfg"
if [ -x "$CFGEN_NETWORK" ]; then
$CFGEN_NETWORK || true
fi
/etc/rc.network start || true
fi
end script
post-stop script
MULTI_GATEWAY=`/bin/get_key_value /etc/synoinfo.conf multi_gateway` || true
if [ "x$MULTI_GATEWAY" = "xyes" ]; then
/usr/syno/sbin/synonetdtool --enable-multi-gateway || true
/usr/syno/sbin/synonetdtool --enable-multi-gateway-v6 || true
else
/usr/syno/sbin/synonetdtool --disable-multi-gateway || true
/usr/syno/sbin/synonetdtool --disable-multi-gateway-v6 || true
fi
end script
# vim:ft=upstart