# By Chih-Wei Huang <cwhuang@linux.org.tw>
# and Thorsten Glaser <tg@mirbsd.org>
#
-# Last updated 2018/01/26
-#
# License: GNU Public License
# We explicitely grant the right to use the scripts
# with Android-x86 project.
return 1
fi
if [ -e /mnt/$SRC/system.sfs ]; then
- mount -o loop,noatime /mnt/$SRC/system.sfs /sfs
- mount -o loop,noatime /sfs/system.img system
+ mount -o loop,noatime /mnt/$SRC/system.sfs system
+ if [ -e system/system.img ]; then
+ mount --move system /sfs
+ mount -o loop,noatime /sfs/system.img system
+ fi
elif [ -e /mnt/$SRC/system.img ]; then
remount_rw
mount -o loop,noatime /mnt/$SRC/system.img system
if [ -x system/bin/sh ]; then
echo Running MirBSD Korn Shell...
USER="($1)" system/bin/sh -l 2>&1
+ [ $? -ne 0 ] && /bin/sh 2>&1
else
echo Running busybox ash...
sh 2>&1
zcat /src/install.img | ( cd /; cpio -iud > /dev/null )
fi
-if [ -x system/bin/ln -a \( -n "$DEBUG" -o -n "$BUSYBOX" \) ]; then
- mv /bin /lib .
+if [ -x system/bin/ln -a -n "$BUSYBOX" ]; then
+ mv -f /bin /lib .
sed -i 's|\( PATH.*\)|\1:/bin|' init.environ.rc
rm /sbin/modprobe
busybox mv /sbin/* sbin