aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/preinit
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2011-07-07 02:52:02 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2011-07-07 02:52:02 +0000
commit1f69f4cf64cb9676cc8ddd6a832221a20659a4b9 (patch)
treed6228d8032456b314708b2e360ef492571ebd8ee /package/base-files/files/lib/preinit
parentdd4934a943d4de4fd4a85620889276bc0c8bdcc5 (diff)
downloadupstream-1f69f4cf64cb9676cc8ddd6a832221a20659a4b9.tar.gz
upstream-1f69f4cf64cb9676cc8ddd6a832221a20659a4b9.tar.bz2
upstream-1f69f4cf64cb9676cc8ddd6a832221a20659a4b9.zip
base-files: preinit: Fixed sourcing of diag.sh in /etc/preinit. This caused errors due to frequent use of /proc/cpuinfo to determine board name to pick led layout. Now diag.sh (which only defines set_state and any helper functions) is sourced by a proper preinit function during preinit_main, which is after /proc has been brought up, unlike in /etc/preinit
SVN-Revision: 27501
Diffstat (limited to 'package/base-files/files/lib/preinit')
-rw-r--r--package/base-files/files/lib/preinit/02_default_set_state7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/base-files/files/lib/preinit/02_default_set_state b/package/base-files/files/lib/preinit/02_default_set_state
new file mode 100644
index 0000000000..df43395726
--- /dev/null
+++ b/package/base-files/files/lib/preinit/02_default_set_state
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+define_default_set_state() {
+ . /etc/diag.sh
+}
+
+boot_hook_add preinit_main define_default_set_state