Bryan Kadzban wrote:
I'm not sure what kind of machinery would be needed, but I made a simple dev.d script for rtc, to handle this case.
Wonderful, thanks!
Number one, it'll print an error to "somewhere" (syslog? udev's log? the system console? no idea) if your rtc module wasn't configured to support /proc/sys/dev/rtc.
Well logging that/any error is better than halting the boot process, which is what happened with my previous attempts.
Number two, if the rtc module doesn't create /proc/sys/dev/rtc before it runs the hotplug handler, then the script might fail due to that race on some machines under some loads. (The driver might do this, too; it calls misc_register way before it calls the function to register /proc/sys/dev/rtc/max-user-freq, anyway.) There isn't much I can do about that, I don't think.
OK, the initial thought that crossed my mind on this one, is to simply sleep until the directory has been created:
#!/bin/sh
if [ "$ACTION" == "add" ]; then while [ ! -d /proc/sys/dev/rtc ]; do sleep 1; done; echo "1024" > /proc/sys/dev/rtc/max-user-freq; fi
I'm hoping the dev.d scripts are all handled asynchrohously - i.e. udev doesn't wait for one to complete before kicking off the next, otherwise boot times might be significantly slowed down with all that spinning.
Regards,
Matt. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page