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
 

AlexWilMac

Moderator
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.
 

aligator638

Vu+ Newbie
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.
 

aligator638

Vu+ Newbie
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)
 

aligator638

Vu+ Newbie
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)
 

aligator638

Vu+ Newbie
First to fix /var/tmp/ntpv4.local

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


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