diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-07 21:29:59 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-07 21:29:59 +0200 |
commit | 92ee1314c1c4f6a93bbca3c4ffaeddc51b5609af (patch) | |
tree | 3ca44c4fa2ad6f8bc4b12d1191d49871cbfe3196 /package/ppp/files/etc/ppp/ip-up.d/02-ntp | |
parent | 0c0581d7172675307053f0097130c01a7898c81d (diff) |
handle resolv.conf and ntp for pppoe network setup correctly
Diffstat (limited to 'package/ppp/files/etc/ppp/ip-up.d/02-ntp')
-rw-r--r-- | package/ppp/files/etc/ppp/ip-up.d/02-ntp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/package/ppp/files/etc/ppp/ip-up.d/02-ntp b/package/ppp/files/etc/ppp/ip-up.d/02-ntp new file mode 100644 index 000000000..ac25dd567 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-up.d/02-ntp @@ -0,0 +1,10 @@ +#!/bin/sh + +. /etc/rc.conf + +# get time via ntpclient if available +[ -x /usr/sbin/ntpclient ] && ntpclient -s -h pool.ntp.org +# get time via rdate if available +[ -x /usr/sbin/rdate ] && rdate -nv pool.ntp.org +# restart ntpd when enabled +test x"${ntpd:-NO}" = x"NO" || /etc/init.d/ntpd restart |