#2639: Udev-152
------------------------------------------+---------------------------------
Reporter: matt...@… | Owner: lfs-b...@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.7
Component: Book | Version: SVN
Severity: normal | Keywords:
------------------------------------------+---------------------------------
Comment(by br...@…):
Bootscripts fixed in r9256.
However, the rule that calls setclock might be an issue here. If (a
future version of) udev makes it hard to do "add" rules properly somehow,
under the assumption that everyone uses devtmpfs and so add rules are
"wrong" somehow, we'll need to change this to a "!remove" rule. (Or
change it to an "add|change" rule, though it doesn't look like that's
preferred anymore either.)
And that will rerun the bootscript if udev does happen to get a change
event for the rtc device node(s). Which is horribly wrong, if you're
using NTP. :-(
We can't really save any state away either (to make setclock only do its
work once per boot), since this script runs during udev, and before
mountfs. And it won't work to compare the hardware clock time to the
system clock time, since if the hwclock is five hours off, you don't want
to break the system on every change event.
We might be able to save something in the udev database though; hmm.
Maybe:
{{{
SUBSYSTEM=="rtc", ACTION=="!remove", ENV{CLOCK_SET}!="1" MODE="0644", \
RUN+="/etc/rc.d/init.d/setclock start", ENV{CLOCK_SET}="1"
KERNEL=="rtc", ACTION=="!remove", ENV{CLOCK_SET}!="1" MODE="0644", \
RUN+="/etc/rc.d/init.d/setclock start", ENV{CLOCK_SET}="1"
}}}
Opinions? Better ideas?
(Also, I should note that udev-152 has a bug:
http://www.spinics.net/lists/hotplug/msg03698.html -- we probably want to
wait for -153.)
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2639#comment:2>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page