#!/bin/sh

if [ "$1" != "stratum" ] ; then
	echo "Warning, unknown argument for \`lnxntpd_sync: '$@'"
fi

if [ -n "${BIN_BUSYBOX}" ] ; then
	echo "Update RTC time from system time..."
	"${BIN_BUSYBOX}" hwclock -w
	exit $?
fi

echo "Error, BUSYBOX not specified, cannot update RTC time."
exit 1
