Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: felipegn on June 04, 2014, 02:20:29 AM

Title: Instruction before the shutdown of Debian Wheezy
Post by: felipegn on June 04, 2014, 02:20:29 AM
Hello guys.

When I read the MOD-RTC documentation, I saw this:

QuoteIf you want to sync system clock on boot you can add the code to rc.local
#vi /etc/rc.local

I wanto to use something like that but before the shutdown of Olinuxino. Does anyone know how to do that? Is there any file like rc.local for shutdown?

Thank you very much!

Cheers!
Title: Re: Instruction before the shutdown of Debian Wheezy
Post by: kantal on June 04, 2014, 11:38:44 AM
Hi!

Look at man inittab,
or create a crontab entry for cyclic sync.
Title: Re: Instruction before the shutdown of Debian Wheezy
Post by: MBR on June 09, 2014, 12:56:36 AM
There is an initscript designed just for the retrieving/storing time from/to the RTC and it's called hwclock.sh. So if the command hwclock does not work, try modifiy that one, especialy the section stop.
Title: Re: Instruction before the shutdown of Debian Wheezy
Post by: felipegn on June 11, 2014, 11:19:12 PM
Hello again.

Thank you for your help.

I solved my problem creating a script like /etc/rc.local and /etc/init.d/rc.local, but I changed it's runlevel to 0, 1 and 6.

I used the function update-rc.d to configure the scripts.

Thank you.