summaryrefslogtreecommitdiff
path: root/packages/busybox/switchbox-1.00
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2005-02-20 23:58:27 +0000
committerRod Whitby <rod@whitby.id.au>2005-02-20 23:58:27 +0000
commitf2ebc5cf4c64f6e47c88a614f1af509d03c22eab (patch)
tree3f18155fda6d55647a8d58f0e47742b1b3e971c2 /packages/busybox/switchbox-1.00
parent400ba9cbac901693cebd7314b8e0d7bab992923d (diff)
Switchbox fixes for OpenSlug - moved test for runboot before pivot
BKrev: 42192423DOErl8MosPv9vLJNxtbH4g
Diffstat (limited to 'packages/busybox/switchbox-1.00')
-rw-r--r--packages/busybox/switchbox-1.00/linuxrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/busybox/switchbox-1.00/linuxrc b/packages/busybox/switchbox-1.00/linuxrc
index 850d359000..90e365158d 100644
--- a/packages/busybox/switchbox-1.00/linuxrc
+++ b/packages/busybox/switchbox-1.00/linuxrc
@@ -152,16 +152,16 @@ if [ -n "$mounted" ] ; then
fi
umount /proc
cd $mounted
- /sbin/pivot_root . initrd
- if [ -x /linuxrc ] ; then
+ if [ -x ./linuxrc -o -L ./linuxrc ] ; then
runboot=/linuxrc
- elif [ -x /sbin/init ] ; then
+ elif [ -x ./sbin/init -o -L ./sbin/init ] ; then
runboot=/sbin/init
- elif [ -x /bin/init ] ; then
+ elif [ -x ./bin/init -o -L ./bin/init ] ; then
runboot=/bin/init
else
runboot=/bin/sh
fi
+ /sbin/pivot_root . initrd
exec chroot . $runboot < dev/console > dev/console 2>&1
fi