]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ntp/files/ntpdate
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ntp / files / ntpdate
1 #!/bin/sh
2
3 PATH=/sbin:/bin:/usr/bin
4
5 test -f /usr/bin/ntpdate || exit 0
6
7 if test -f /etc/default/ntpdate ; then
8 . /etc/default/ntpdate
9 else
10 NTPSERVERS="pool.ntp.org"
11 fi
12
13 test -n "$NTPSERVERS" || exit 0
14
15 case "$1" in
16 start|force-reload)
17   echo -n "Running ntpdate to synchronize clock"
18   /usr/bin/ntpdate -u -b -s $NTPOPTIONS $NTPSERVERS
19   echo "."
20   ;;
21 restart|reload)
22   # Drop -b to slew clock rather than step it if called after system is up
23   echo -n "Running ntpdate to synchronize clock"
24   /usr/bin/ntpdate -u -s $NTPOPTIONS $NTPSERVERS
25   echo "."
26   ;;
27 stop)
28   ;;
29 *)
30   echo "Usage: /etc/init.d/ntpdate {start|stop|restart|reload|force-reload}"
31   exit 1
32 esac
33
34 exit 0