wok-stable diff busybox/stuff/init @ rev 7845
busybox-static: add chroot
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 28 16:44:48 2010 +0100 (2010-12-28) |
parents | 7b3b7e2a569d |
children | aae44f936ae8 |
line diff
1.1 --- a/busybox/stuff/init Tue Dec 28 14:29:53 2010 +0100 1.2 +++ b/busybox/stuff/init Tue Dec 28 16:44:48 2010 +0100 1.3 @@ -124,10 +124,10 @@ 1.4 mount /dev/loop0 /mnt 2> /dev/null 1.5 fi 1.6 grep -q cryptoroot= /proc/cmdline && try_init 1.7 +umount /sys 1.8 grep -q subroot= /proc/cmdline && 1.9 -subroot="/$(sed 's/.*subroot=\([^ ]*\).*/\1/' < /proc/cmdline)" 1.10 -[ -d /mnt$subroot/etc ] && try_init 1.11 -umount /sys 1.12 + subroot="/$(sed 's/.*subroot=\([^ ]*\).*/\1/' < /proc/cmdline)" && 1.13 + exec chroot /mnt$subroot /sbin/init 1.14 echo -n "Switching / to tmpfs..." 1.15 size="$(grep rootfssize= < /proc/cmdline | \ 1.16 sed 's/.*rootfssize=\([0-9]*[kmg%]\).*/-o size=\1/')"