# HG changeset patch # User Pascal Bellard # Date 1385064507 0 # Node ID 2ecc1cd5a9a470df2d971edc81b24cebeec3958b # Parent 9e0af4aa7665c459802643a69c79d19df010d5bb busybox-boot: fix root=device|UUID|LABEL cmdline (again) diff -r 9e0af4aa7665 -r 2ecc1cd5a9a4 busybox-boot/receipt --- a/busybox-boot/receipt Thu Nov 21 21:20:50 2013 +0100 +++ b/busybox-boot/receipt Thu Nov 21 20:08:27 2013 +0000 @@ -76,14 +76,16 @@ arg init init=\${root:-/sbin/init} +[ -n "\$(sed 's/\$/ /;s/^/ /;/ ro /!d' /proc/cmdline)" ] && ro="-o ro" +[ -n "\$(sed 's/\$/ /;s/^/ /;/ rw /!d' /proc/cmdline)" ] && ro="-o rw" arg root && root="\$(echo \$root | sed 's|/|\\\\/|g')" && - mount \$(busybox blkid | sed "s/\"//g;/\$root/!d;s/:.*//;q") /mnt + mount \$ro \$(busybox blkid | sed "s/\"//g;/\$root/!d;s/:.*//;q") /mnt arg loopfs && busybox losetup /dev/loop /mnt/\$root && mount /dev/loop /mnt arg subroot && cp /bin/busybox /mnt/\$root/dev/shm && chroot="\$root/dev/shm/busybox chroot \$root" busybox [ -x /mnt/\$root\$init ] && exec busybox switch_root mnt \$chroot \$init -for i in \$(busybox --list) ; do busybox ln /bin/busybox /bin/\$i; done +for i in \$(busybox --list) ; do ln /bin/busybox /bin/\$i 2> /dev/null ; done [ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb while read type dir ; do