diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-29 07:17:01 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2007-07-29 07:17:01 +0000 |
commit | b32a95eced1d0f22be1751467ff365117e200f3f (patch) | |
tree | 7b968f96d4cf05704a84881272e00a92431c9c7c /target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp | |
parent | afd718e7cd831503d7485e7e291bcd336e6a2789 (diff) |
Add atngw100 target
Diffstat (limited to 'target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp')
-rwxr-xr-x | target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp b/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp new file mode 100755 index 000000000..f996ab09f --- /dev/null +++ b/target/device/Atmel/atngw100/target_skeleton/etc/init.d/S43ntp @@ -0,0 +1,27 @@ +#!/bin/sh + +NTPDATE=/usr/bin/ntpdate + +if [ -f /etc/default/ntpdate ]; then + . /etc/default/ntpdate +else + echo " missing /etc/default/ntpdate" + exit 1 +fi + +echo -n "Starting ntpdate:" +if [ ! -x ${NTPDATE} ]; then + echo " missing" + echo -n " WARNING: could not syncronize clock, " + echo "edit NTPSERVERS in /etc/default/ntpdate." + exit 1 +fi + +if ${NTPDATE} $NTPOPTIONS $NTPSERVERS > /dev/null 2> /dev/null; then + echo " done" +else + echo " failed" + echo -n " WARNING: could not syncronize clock, " + echo "edit NTPSERVERS in /etc/default/ntpdate." + exit 1 +fi |