HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //etc/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