From 4e5d6449f66eb7b5a253be36c7d5f0e974e15613 Mon Sep 17 00:00:00 2001 From: cshore Date: Thu, 7 Jul 2011 02:52:02 +0000 Subject: [package] 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27501 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/lib/preinit/02_default_set_state | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 package/base-files/files/lib/preinit/02_default_set_state (limited to 'package/base-files/files/lib') 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 000000000..df4339572 --- /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 -- cgit v1.2.3