1 |
On Wed, Mar 30, 2011 at 9:59 AM, Ed W wrote: |
2 |
> On 30/03/2011 05:47, Mike Frysinger wrote: |
3 |
>> On Tue, Mar 29, 2011 at 10:06 PM, Joe Sapp wrote: |
4 |
>>> I've got a board with no RTC so there are some problems during boot. |
5 |
>>> Currently there's a hack in the udev init script to get the time from the |
6 |
>>> network (via ntp or rdate), but I'm wondering if somebody else has solved |
7 |
>>> this in a better way. Any ideas? |
8 |
>> |
9 |
>> add your own init.d script, mark it "before udev', and add it to boot runlevel ? |
10 |
> |
11 |
> You would still have the problem that you can't run it until at least |
12 |
> after you start network of course? |
13 |
|
14 |
that depends on how the board comes up. if the boot loader provides |
15 |
network settings to the kernel (autoconfig), it might be up. or if |
16 |
people have an initramfs that brings things up. |
17 |
|
18 |
> Some people might not know of /etc/init.d/swclock. It writes the time |
19 |
> at shutdown and restores *that* old time on bootup. For some scenarios |
20 |
> that might get you a time close to reality... (eg if you just want to |
21 |
> check stuff like "has this file changed" and avoid "clock moved |
22 |
> backwards" kind of issues) |
23 |
|
24 |
that can be useful depending on the system needs. i tend to forget about it ;). |
25 |
-mike |