1 |
Hi folks, |
2 |
|
3 |
I have a couple of boards that ship by default without RTC devices and |
4 |
boot time always incurs the following nasty messages in multiplicity. |
5 |
|
6 |
... |
7 |
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf |
8 |
* has a modification time in the future! |
9 |
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf |
10 |
* has a modification time in the future! |
11 |
... |
12 |
|
13 |
A very simple solution was be to maintain an /etc/sanetime file that |
14 |
would set a time other than the epoch at boot. Something within the |
15 |
last day, month, year, or decade even ;-) |
16 |
|
17 |
There's a fallback sanetime in /etc/init.d/sanetime just in case |
18 |
/etc/sanetime doesn't exist, and it works naturally because time is |
19 |
monotonically increasing (last I checked). |
20 |
|
21 |
Also, it would seem that /etc/clock doesn't fail gracefully when there |
22 |
is no rtc, even when there are provisions to 'fakeit' for other |
23 |
reasons. |
24 |
|
25 |
... |
26 |
* Cannot access the Hardware Clock via any known method. |
27 |
Use the --debug option to see the details of our search for an access method.Can |
28 |
not access the Hardware Clock via any known method. |
29 |
Use the --debug option to see the details of our search for an access method. |
30 |
* Failed to set clock You will need to set the clock yourself |
31 |
|
32 |
[ !! ] |
33 |
... |
34 |
|
35 |
It was just a matter of adding an /etc/init.d/sanetime script, |
36 |
slightly patching /etc/init.d/clock & /sbin/rc (AFAIK this only works |
37 |
for sysvinit, not openrc). |
38 |
|
39 |
See the attached files. |
40 |
|
41 |
Cheers, |
42 |
|
43 |
C |
44 |
|
45 |
PS: I was going to file a bug report, but it seems that the |
46 |
certificate for bugs.gentoo.org has become invalid ATM. |