add mke2fs support to busybox

pull/5/head
Tomas M 2012-10-03 23:22:08 -05:00
parent 9fbba78499
commit 2391750728
6 changed files with 9 additions and 3 deletions

View File

@ -58,6 +58,12 @@ if [ "$1" = "--init" ]; then
# First, mount proc again since it will be needed and it was already unmounted # First, mount proc again since it will be needed and it was already unmounted
mount -t proc proc /proc >/dev/console 2>&1 mount -t proc proc /proc >/dev/console 2>&1
# if debug is requested, start commandline prompt here
if grep -q debug /proc/cmdline; then
echo "Starting shell for debug" >/dev/console
setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1'
fi
# next, unmount everything from union, backwards # next, unmount everything from union, backwards
tac /proc/mounts | grep union | cut -d " " -f 2 | while read LINE; do tac /proc/mounts | grep union | cut -d " " -f 2 | while read LINE; do
umount $LINE >/dev/console 2>&1 umount $LINE >/dev/console 2>&1
@ -74,7 +80,7 @@ if [ "$1" = "--init" ]; then
# if the previous unmount failed due to some busy err # if the previous unmount failed due to some busy err
mount -o remount,ro /memory/data >/dev/console 2>/dev/null mount -o remount,ro /memory/data >/dev/console 2>/dev/null
# if debug is requested, start commandline prompt here # and finally, last chance to run some commands by hand
if grep -q debug /proc/cmdline; then if grep -q debug /proc/cmdline; then
echo "Starting shell for debug" >/dev/console echo "Starting shell for debug" >/dev/console
setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1' setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1'

View File

@ -42,7 +42,7 @@ cd static
./update ./update
cd .. cd ..
cp static/{busybox,mount.*} $INITRAMFS/bin cp static/{busybox,mount.dynsizefs,mount.ntfs-3g} $INITRAMFS/bin
chmod a+x $INITRAMFS/bin/{busybox,mount.*} chmod a+x $INITRAMFS/bin/{busybox,mount.*}
$INITRAMFS/bin/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do $INITRAMFS/bin/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -24,4 +24,4 @@ fi
ln -f busybox-$MYARCH ./busybox ln -f busybox-$MYARCH ./busybox
ln -f mount.ntfs-3g-$MYARCH ./mount.ntfs-3g ln -f mount.ntfs-3g-$MYARCH ./mount.ntfs-3g
ln -f mount.posixovl-$MYARCH ./mount.posixovl ln -f mount.dynsizefs-$MYARCH ./mount.dynsizefs