sed -i '/^\s*tinker panic/ d' /target/etc/ntp.conf && \
sed -i '1 i tinker panic 0' /target/etc/ntp.conf && \
mkdir /target/var/lib/ntp && \
echo 0 > /target/var/lib/ntp/ntp.drift && \
in-target chown -R ntp:ntp /var/lib/ntp && \
sed -i '/^\s*server/ d' /target/etc/ntp.conf && \
echo "server $server burst iburst" >> /target/etc/ntp.conf && \
in-target sntp -t4 -S $server;\
in-target hwclock --systohc;\

sed -i '/^\s*tinker panic/ d' /target/etc/ntp.conf && \
sed -i '1 i tinker panic 0' /target/etc/ntp.conf && \
mkdir -p /target/var/lib/ntp && \
echo 0 > /target/var/lib/ntp/ntp.drift && \
in-target chown -R ntp:ntp /var/lib/ntp && \
sed -i '/^\s*server/ d' /target/etc/ntp.conf && \
echo "server $server burst iburst" >> /target/etc/ntp.conf && \
in-target sntp -t4 -S $server;\
in-target hwclock --systohc;\

Change way to create /var/lib/ntp from ubuntu snippet
Change way to create /var/lib/ntp from ubuntu snippet

mkdir call leaved here to backward compatibility with next
versions of ntp (which may be pre-packaged and may not create
/var/lib/ntp directory).

Change-Id: Ieb3b045f1c8b2cb36c8677ce7901c8fc71c9e2ed
Closes-Bug: 1416133
