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/syno-network-check.conf
description "Check if network is ready"

author "System Integration Team"

start on syno.net.device_up IFACE!=lo
stop on runlevel [06]

console log

pre-start script
	## log time for debug purpose
	/bin/date || true
	echo "network_iface_ready="`awk '{print $1}' /proc/uptime` >> /run/synoservice/bootup_time_detail || true

	/usr/syno/bin/synofirewall --reload || true
	/usr/syno/bin/syno_iptables_common start || true

	## make sure getaddrinfo function is work before emit network.ready event
	for i in `seq 1 1 30`; do
		if /usr/syno/sbin/synobootupcheck --check-network; then
			break;
		fi
		/bin/sleep 1 || true
	done

	## emit syno.network.ready
	/bin/echo `/bin/date` "[${IFACE}] emits syno.network.ready" || true
	/sbin/initctl emit --no-wait syno.network.ready || true
	echo "network_ready="`awk '{print $1}' /proc/uptime` >> /run/synoservice/bootup_time_detail || true
end script