On Sun, 28 Nov 2010 09:12:35 +0100 Michael Kämmerer <m...@h3c.de> wrote:
> I'm trying to realize a "diag.sh" file for signaling the router state > via led flashing. > > My problem is, that when I try to read out the file "/proc/cpuinfo", > I get an error on serial console, that there is no file cpuinfo. You need to do it via a file in lib/preinit that happens during hook preinit_main, and in a function that is called by the hook, not when sourced. This is because when the files are source /proc doesn't exist yet. > > A look in base-files - lib/preinit shows: > > 10_check_for_mtd > 10_essential_fs > 10_indicate_failsafe > 10_indicate_preinit > > that "10_essential_fs", which is mounting proc > and "10_indicate_preinit" have the same numbering and in my case, they > are executed in the wrong order. These don't actually happen all at the same time. They happen at point *for the hook they are part of*. If you look at the bottom of the file you can see the hook they are added to. You will see that some are part of preinit_essential, which happen before anything in preinit_main. See /etc/preinit to see the overall controlling script. There is some information at http://wiki.openwrt.org/doc/techref/preinit_mount that might help you. -- <erno> hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is. GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C http://gnupg.org
signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel