#!/bin/sh
# /etc/ipup.d/ntp : start ntpd once an interface is up.
#
# Called with the interface name as $1 by /usr/share/udhcpc/default.script
# on a DHCP bound event and by /etc/init.d/network.sh for a static IP. It
# keeps ntpd out of RUN_DAEMONS so the boot never waits for DNS: busybox
# ntpd retries the pool name by itself while it does not resolve.
# NB: not named ntpd, busybox pidof would match this script's own cmdline.
[ -x /etc/init.d/ntpd ] || exit 0
pidof ntpd >/dev/null 2>&1 && exit 0
/etc/init.d/ntpd start >/dev/null 2>&1 </dev/null
