File: //proc/thread-self/root/etc.defaults/init/network-interface.conf
description "configure network device"
start on net-device-add
emits syno.net.device_up
instance $IFACE
export IFACE
pre-start script
case ${IFCONFIG_ARGS} in
'')
;;
[Dd][Hh][Cc][Pp])
# up dhcp device on `rc.network start`
;;
*) #for 'static' and 'none'
/sbin/ifconfig ${IFACE} ${IFCONFIG_ARGS}
# syno.net.device_up is only for control service on booting up sequence
# do not emit this event on shutdown
if ! /usr/syno/bin/synobootseq --is-shutdown > /dev/null 2>&1 ; then
/sbin/initctl emit --no-wait syno.net.device_up IFACE=$IFACE TYPE=static
fi
esac
/usr/bin/logger -p err -t interface-catcher "$IFACE ($IFCONFIG_ARGS) is added" || true
end script
post-stop script
/usr/bin/logger -p err -t interface-catcher "$IFACE ($IFCONFIG_ARGS) is removed" || true
end script
# vim:ft=upstart