Hardware Reference
In-Depth Information
Setting the Date and Time
With this in mind you still want the NTP running, especially if you want to turn your Raspberry Pi into a TV recorder.
Recording the wrong TV show because your system clock has drifted an hour would not be a good outcome. Having
the correct time is also useful for when you need to check system logs or report faults to XBMC; better timekeeping
may help the XBMC team solve your issue quicker. There are two steps to this. The first step is to set your location.
This can be done via the GUI. Select System Settings Appearances and then select International. Select your time
zone and time zone country. You can see my time zone settings in Figure 7-11 .
Figure 7-11. Time zone settings
Now that you have the correct time zone, you need to keep the NTP daemon running during the OpenELEC
install. There is a certain filesystem mount in OpenELEC that is persistent across reboots. This mount is called
/storage: anything created under this directory will not get erased on reboot. OpenELEC comes with the NTP daemon:
you can find it at /usr/sbin/ntpd . So how can you get NTP to autostart on each reboot? It's not as easy as it sounds if
your root filesystem is restored from an image on each boot.
Lucky for you the OpenELEC team allows you to create a script called autostart.sh ; this script can be used to
run commands when the system starts.
1.
Connect to your OpenELEC installation via SSH.
2.
You now need to create this file in a certain location for OpenELEC to read it on startup.
Change into the /storage/.config directory:
# cd /storage/.config
 
Search WWH ::




Custom Search