This board is now closed. The Blackhole image ended in 2020. The board will remain available in Read Only Mode, so all the posts from the last 15+ years are not lost. We thank you for being part of the community for the last 15+ years. You can join the OpenBh board if you have not already done so at www.openbh.net.

Bug time/cron job

aligator638

Vu+ Newbie
I used the latest version of OBH, in the setup menu I set the time to synch ntp server every 30mn, or every day. The value is reflected in /etc/enigma2settings after each change perfectly
However the crontab job is never updated.

30 * * * * /usr/bin/ntpdate-sync silent
 
What really matters is: do you have the right time or not?
I've always and only use the NTP options in OBH and I've never had any problems, so far.
 
I've always and only use the NTP options in OBH and I've never had any problems, so far.

Right, but what's the point having the option to select how often to have the time updated if it is not used at all?

So after all this I decided to check if the thing was implemented at all and it seems not

root@duo2:~# date -s 10:00
Tue Feb 26 10:00:00 +03 2019
root@duo2:~# /sbin/stb-hwclock --systohc
root@duo2:~# date
Tue Feb 26 20:19:10 +03 2019

So it seems not and the box is still locked on transponder time like in normal BH.
 
This is even worse than what I first thought the script is not even running !

root@duo2:~# cat /etc/cron/crontabs/root
30 * * * * /usr/bin/ntpdate-sync silent
root@duo2:~# /usr/bin/ntpdate-sync silent
/var/tmp/ntpv4.local: line 1: 85.21.78.91: command not found
root@duo2:~# cat /var/tmp/ntpv4.local
NTPV4=10.10.20.1 85.21.78.91 94.16.114.254 37.58.57.238 185.207.104.70

The time servers are not quoted properly, so this is why it fails
NTPV4="10.10.20.1 85.21.78.91 94.16.114.254 37.58.57.238 185.207.104.70"

Besides, the logic inside /usr/bin/ntpdate-sync is broken since the values taken from the dhcp would take precedence over the one defined in /etc/default/ntpdate (which is set by the menu)
 
This is even worse than what I first thought the script is not even running !

root@duo2:~# cat /etc/cron/crontabs/root
30 * * * * /usr/bin/ntpdate-sync silent
root@duo2:~# /usr/bin/ntpdate-sync silent
/var/tmp/ntpv4.local: line 1: 85.21.78.91: command not found
root@duo2:~# cat /var/tmp/ntpv4.local
NTPV4=10.10.20.1 85.21.78.91 94.16.114.254 37.58.57.238 185.207.104.70

The time servers are not quoted properly, so this is why it fails
NTPV4="10.10.20.1 85.21.78.91 94.16.114.254 37.58.57.238 185.207.104.70"

Besides, the logic inside /usr/bin/ntpdate-sync is broken since the values taken from the dhcp would take precedence over the one defined in /etc/default/ntpdate (which is set by the menu)
 
First to fix /var/tmp/ntpv4.local

the file /etc/udhcpc.d/55ntp should be modified to line 15


echo NTPV4="\"${ntpsrv}\"" > $NTPSERVER_CONF
 
Back
Top