#! /bin/sh
### BEGIN INIT INFO
# Provides:             start-ntp
# Required-Start:	$networking
# Required-Stop:
# Default-Start:        2 3 4 5
# Default-Stop:         1
# Short-Description:    NTP client running script
### END INIT INFO
#

FIRST_BOOT_FILE="/.first-boot"
SECOND_BOOT_FILE="/.second-boot"
NTP_CLIENT="/usr/bin/ntp-client"

if [ "$1" != "start" ] || [ -f "${FIRST_BOOT_FILE}" ] || [ -f "${SECOND_BOOT_FILE}" ]
then
	exit 0
fi

if [ -x "${NTP_CLIENT}" ]
then
	"${NTP_CLIENT}" &
fi

exit 0
