PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [Spark7162] NTP sync



miciomax
06.10.2015, 22:41
Is there a way in HDMU image to sync time and date from a NTP server automatically at boot if tuners are disconnected from dish?
Obviously other than manual ssh commands every reboot...


Thanks

santa
07.10.2015, 06:54
There are many threads in German, you have to create a ownscript.sh and there must be a sleep and nptd comand.

Audioniek
08.10.2015, 20:42
Yes there is. apart from the solution given above, you can also use this one. It is an excerpt from the routine /etc/init.d/rcS I use for Spark7162's:


....
# Try and synchronise time
if [ -e /sbin/ntpdate ]; then
echo "Set internet time"
/sbin/ntpdate de.pool.ntp.org
/bin/fp_control -sst &
fi

echo "Start Enigma2"
echo "Start SH4 Enigma2" > /dev/vfd

until false
do
....


Insert this part just before Enigma2 is started in your /etc/init.d/rcS. It is easy to find, look for until false.... The line with ntpdate synchronizes the system time with the internet time server (in this case de.pool.ntp.org, you can use another if you want). The next line with fp_control copies the system time to the front panel clock. At this point the display clock should adjust to the correct time, provided the receiver can reach the internet. There is no need for sleep statements; this only is required if you want to use a transponders time. Then you must delay until it is pretty certain the receiver has tuned to the startup program and a dish is connected.

Regards,

Audioniek.

miciomax
09.10.2015, 23:31
for those who need it:11578