Re: [OpenWrt-Devel] [PATCH] [boot] /init: allow easier customisation of ramfs boot.

2014-08-25 Thread John Crispin
Hi

On 23/08/2014 22:46, Stephen Parry wrote:
 +if [ -e /bin/ramfsinit ]; then + exec /bin/ramfsinit +fi +if [ -e
 /sbin/ramfsinit ]; then + exec /sbin/ramfsinit +fi

i cannot find either of these files inside the tree. where do they
come from ?

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [boot] /init: allow easier customisation of ramfs boot.

2014-08-24 Thread Bastian Bittorf
* Stephen Parry sgpa...@mainscreen.com [24.08.2014 08:28]:
 +if [ -e /bin/ramfsinit ]; then
 + exec /bin/ramfsinit
 +fi

better use:
elif [ -e /sbin/ramfsinit ]; then

 +if [ -e /sbin/ramfsinit ]; then
 + exec /sbin/ramfsinit
 +fi

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [boot] /init: allow easier customisation of ramfs boot.

2014-08-23 Thread Stephen Parry
/init is the first pid 1 process in an initramfs environment. This fix adds
lines to check for the existence of /bin/ramfsinit or /sbin/ramfsinit and exec
if present. This allows packages to switch root early in the boot process. This
will help support booting or kexecing from external storage and go some way
toward fixing ticket #17465.

Signed-off-by: Stephen Parry sgpa...@mainscreen.com
---
 target/linux/generic/base-files/init | 8 
 1 file changed, 8 insertions(+)

diff --git a/target/linux/generic/base-files/init 
b/target/linux/generic/base-files/init
index 514be57..cae515d 100755
--- a/target/linux/generic/base-files/init
+++ b/target/linux/generic/base-files/init
@@ -1,4 +1,12 @@
 #!/bin/sh
 # Copyright (C) 2006 OpenWrt.org
 export INITRAMFS=1
+
+if [ -e /bin/ramfsinit ]; then
+   exec /bin/ramfsinit
+fi
+if [ -e /sbin/ramfsinit ]; then
+   exec /sbin/ramfsinit
+fi
+
 exec /sbin/init
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel