2007-07-29 09:15:35 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
NTPDATE=/usr/bin/ntpdate
|
|
|
|
|
|
|
|
if [ -f /etc/default/ntpdate ]; then
|
|
|
|
. /etc/default/ntpdate
|
|
|
|
else
|
2007-08-17 15:02:52 +02:00
|
|
|
echo "WARNING: missing /etc/default/ntpdate"
|
2007-07-29 09:15:35 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2007-08-17 15:02:52 +02:00
|
|
|
echo -n "Starting ntpdate: "
|
2007-07-29 09:15:35 +02:00
|
|
|
if [ ! -x ${NTPDATE} ]; then
|
2007-08-17 15:02:52 +02:00
|
|
|
echo "missing"
|
2007-07-29 09:15:35 +02:00
|
|
|
echo -n " WARNING: could not syncronize clock, "
|
|
|
|
echo "edit NTPSERVERS in /etc/default/ntpdate."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2007-08-17 15:02:52 +02:00
|
|
|
if ${NTPDATE} $NTPOPTIONS $NTPSERVERS; then
|
|
|
|
echo "done"
|
2007-07-29 09:15:35 +02:00
|
|
|
else
|
2007-08-17 15:02:52 +02:00
|
|
|
echo "failed"
|
2007-07-29 09:15:35 +02:00
|
|
|
echo -n " WARNING: could not syncronize clock, "
|
|
|
|
echo "edit NTPSERVERS in /etc/default/ntpdate."
|
|
|
|
exit 1
|
|
|
|
fi
|