Jump to content


Photo

Startup Script - Correct System Time/Date


  • Please log in to reply
4 replies to this topic

#1 nfnovice

  • Senior Member
  • 696 posts

0
Neutral

Posted 6 August 2008 - 01:28

Greetings
I have a need to run a script at start up
I found the update-rc.d functionality and added it

update-rc.d /etc/init.d/myscript.sh default 100

and rebooted
the script runs fine but still thinks the date is 01/01/1970 when it runs
so I need the correct time/date to be set prior to running this script

any ideas at what point in the bootup the time/date gets set from transponder and can I force this at the start of my script?
I dont care if my script doesnt start for 5 minutes after bootup if it has to wait that long ..
DM800+DM7025+DM7020+DM7000+DM600+DM5620+DM500+VUDUO Dreambox great invention - whats it for ?

Re: Startup Script - Correct System Time/Date #2 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 6 August 2008 - 08:25

enigma is responsible for setting the time. It is started directly from inittab, in runlevel 2.
by the time enigma finally receives a valid time from the transponder, the init scripts have all been started.

A solution might be to install ntp and ntpdate, to retrieve the time from a timeserver.


Re: Startup Script - Correct System Time/Date #3 nfnovice

  • Senior Member
  • 696 posts

0
Neutral

Posted 6 August 2008 - 10:14

thanks pieterg for reply
will look for ntp for my DM600
thinking out loud here
my script is set to run in background (ending command line with &)
I might try to start script with sleep for 5 minutes to allow enigma to kick in
worth a try I guess
thanks again
DM800+DM7025+DM7020+DM7000+DM600+DM5620+DM500+VUDUO Dreambox great invention - whats it for ?

Re: Startup Script - Correct System Time/Date #4 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 6 August 2008 - 10:24

ntp is easer:

ipkg update && ipkg install ntp && ipkg install ntpdate

ntpdate should probably be started before your S100.

Re: Startup Script - Correct System Time/Date #5 nfnovice

  • Senior Member
  • 696 posts

0
Neutral

Posted 6 August 2008 - 22:52

thanks pieterg - I will try that when I get home and report back
DM800+DM7025+DM7020+DM7000+DM600+DM5620+DM500+VUDUO Dreambox great invention - whats it for ?


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users