65ffcdec62
git-svn-id: svn://svn.openwrt.org/openwrt/packages@12538 3c298f89-4303-0410-b956-a3cf2f4a3e73
13 lines
348 B
Plaintext
13 lines
348 B
Plaintext
case "${ACTION:-ifup}" in
|
|
ifup)
|
|
ps | grep -v 'grep' | grep -v '20-ntpd' | grep -q 'ntpd' || {
|
|
route -n 2>/dev/null | grep -q '^0.0.0.0' && {
|
|
/etc/init.d/ntpd enabled && /etc/init.d/ntpd start 2>/dev/null >/dev/null
|
|
}
|
|
}
|
|
;;
|
|
ifdown)
|
|
route -n 2>/dev/null | grep -q '^0.0.0.0' || /etc/init.d/ntpd stop 2>/dev/null >/dev/null
|
|
;;
|
|
esac
|