wok-next rev 7817
busybox/init: add subroot= parameter
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 25 15:12:42 2010 +0100 (2010-12-25) |
parents | 0a193bca63c3 |
children | 083fdd98c8b0 |
files | busybox/stuff/init |
line diff
1.1 --- a/busybox/stuff/init Sat Dec 25 13:41:23 2010 +0100 1.2 +++ b/busybox/stuff/init Sat Dec 25 15:12:42 2010 +0100 1.3 @@ -3,7 +3,10 @@ 1.4 launch_init() 1.5 { 1.6 echo -e "\\033[70G[ \\033[1;33mOK\\033[0;39m ]" 1.7 - exec /sbin/switch_root mnt /sbin/init 1.8 + subroot= 1.9 + grep -q subroot= /proc/cmdline && 1.10 + subroot="/$(sed 's/.*subroot=\([^ ]*\).*/\1/' < /proc/cmdline)" 1.11 + exec /sbin/switch_root mnt$subroot /sbin/init 1.12 } 1.13 1.14 failed()