Hi devs,

could anybody explain the idea behind the patch 
target/linux/generic/patches-3.9/921-use_preinit_as_init.patch ?
The current patch drops all references to the "standard init locations" and only
use /etc/preinit.
I would like to have the ability to use the same kernel tree with other
distributions, too (yeah, shame on me - but some customers have asked for
Debain...  :-)

So I would propose to replace this patch with the following. It looks for 
OpenWRT's
preinit at first and if this script does not exist, the standard init locations 
were
tried as usual.

I did not tried the patch yet.
Want do you think? Do I miss anything?

BR, Michael

--- a/init/main.c
+++ b/init/main.c
@@ -835,7 +835,8 @@ static int __ref kernel_init(void *unuse
                printk(KERN_WARNING "Failed to execute %s.  Attempting "
                                        "defaults...\n", execute_command);
        }
-       if (!run_init_process("/sbin/init") ||
+       if (!run_init_process("/etc/preinit") ||
+           !run_init_process("/sbin/init") ||
            !run_init_process("/etc/init") ||
            !run_init_process("/bin/init") ||
            !run_init_process("/bin/sh"))

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to