Commit 535b82a8 authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: add S70wrdate to prime counters

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 72c57404
#!/bin/sh
F=/wr/etc/wr_date.conf
# if there is no config file, do nothing.
test -f $F || exit 0
# pick the first server, if any
S=$(grep 'ntpserver' $F | sed 's/ntpserver//' | head -n 1)
# if none, exit
text -z "$D" && exit 0
# pick busybox ntpd explicitly, to avoid real ntpd instances
echo "Setting host time using ntpd"
busybox ntpd -n -q -p $S
echo "Setting WR time from host time"
/wr/bin/wr_date set host
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment