2013-06-15, 20:32
(2013-06-15, 20:12)kataiba Wrote: I've sorted the Time and Date fail by adding this:
#!/bin/sh
(sleep 30; \
/usr/sbin/ntpdate pool.ntp.org; \
)&
to autostart.sh
More on how to create update.sh here
Rather than wait a fixed amount of time and hope it's long enough (which also requires you to fork a sub-process), the following autostart.sh is a better alternative when waiting for the network to come up...
Code:
#!/bin/sh
# Wait for the network to come up...
while [ -z "$(connmanctl state | grep State | grep -E "ready|online")" ]; do sleep 0.25; done; logger -t "$(basename $0)" "** Network is up **"
/usr/sbin/ntpdate pool.ntp.org