| View previous topic :: View next topic |
| Author |
Message |
potuz Tux's lil' helper

Joined: 30 Jan 2010 Posts: 119
|
Posted: Wed Mar 02, 2011 4:24 pm Post subject: setting the date from internet |
|
|
Hello list. I am running gentoo on an old powerbook g4. For some reason I can't set the system clock unless I boot into openfirmware. The problem is that this laptop has a dead battery so if for some reason the power goes off, then the system clock gets reset to 1969.
This is happening quite often, so I thought it might be better to have a script checking the date online at boot-time and actualizing it (date -s works fine for me). I know this is more like a workaround than a solution, but is it a good one? if so, any suggestions as to where to get the date from?
Thanks,
R. |
|
| Back to top |
|
 |
Etal Veteran


Joined: 15 Jul 2005 Posts: 1633
|
Posted: Wed Mar 02, 2011 4:32 pm Post subject: |
|
|
How about "rc-update add ntp-client default"?  _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
| Back to top |
|
 |
audiodef Advocate


Joined: 06 Jul 2005 Posts: 4946
|
Posted: Wed Mar 02, 2011 4:35 pm Post subject: |
|
|
You should be able to replace the CMOS battery cheaply and easily. That would be the best solution.
What DE or WM are you using? The bigger DE's have built-in interfaces for you to tell your system to fetch time from an internet time server.
Regardless of your DE or condition of your CMOS battery, you can read this and similar pages by seaching for "ntpd gentoo". That should tell you what you need to know.  _________________ Gentoo Studio: http://gentoostudio.org
Pappy's Kernel Seeds: http://kernel-seeds.gentoostudio.org
Linux 'Tude Tees: http://skreened.com/geektudetees
A cloud is evaporated water in the sky, thanks. |
|
| Back to top |
|
 |
potuz Tux's lil' helper

Joined: 30 Jan 2010 Posts: 119
|
Posted: Wed Mar 02, 2011 4:50 pm Post subject: |
|
|
Thanks for the quick reply. I'll look into getting the info from an NTP server. A cmos battery would be an option, but I'm lazy enough to open the laptop and look for a replacement here in Brazil. I'm not running any DE nor WM in it since I'm using it mainly as a DLNA server.
R. |
|
| Back to top |
|
 |
|