[Galaxy S I9000 Android Development] Tayutama:
haven't checked with logcat.

and no the scripts isn't to long... the current that i use in v2.1 is even longer...

this one is just a stripped down version

Trying to go over to using a specific userinit.sh depending on which partition type you use.

This should also fix if someone has problem with them not being mounted if script is to long and can't complete before boot is complete

EDIT:

This is the current version being used:

LOOPBACK=/dev/loop0
IMAGE_FILE_DATA_EXT2=/data/image.ex2
IMAGE_FILE_DATA_EXT3=/data/image.ex3
MOUNTPOINT_EXT2=/data/data-ext2
MOUNTPOINT_EXT3=/data/data-ext3
REMOVE_FIX=/data/image.unfix
BACKUP_DIR=/data/bak
TEMP_DIR=/data/sddata

# mount second partition from external sd if there is one
#if [ -e /dev/block/mmcblk1p2 ]; then
# mount and set perms
# busybox mount -t ext2 -o noatime,nodiratime,errors=continue /dev/block/mmcblk1p2 /system/sd;
# busybox chown 1000:1000 /system/sd;
# busybox chmod 771 /system/sd;
#fi;

if [ -e $REMOVE_FIX ]; then
echo "Restoring to previous state."
for i in app data system dalvik-cache; do
busybox rm -rf /data/$i;
busybox mv $BACKUP_DIR/$i /data/$i;
done;
busybox rm -rf /data/app-private;
busybox mv $BACKUP_DIR/app/app-private /data/app-private;
busybox rm -rf /data/app/app-private;

echo "Removing empty folders."
busybox rm -rf $BACKUP_DIR;
if [ -e $IMAGE_FILE_DATA_EXT3 ]; then
busybox rm -rf $MOUNTPOINT_EXT3;
else
busybox rm -rf $MOUNTPOINT_EXT2;
fi;
busybox rm -rf $TEMP_DIR;

echo "Uninstalling userinit script..."
busybox rm /system/bin/playlogos1;
busybox mv /system/bin/playlogosnow /system/bin/playlogos1;

echo "Removing unfix file"
busybox rm -rf $REMOVE_FIX;
reboot
fi;

if [ -e $IMAGE_FILE_DATA_EXT2 ]; then
busybox mknod $LOOPBACK b 7 1;
busybox losetup $LOOPBACK $IMAGE_FILE_DATA_EXT2;
busybox mkdir -p $MOUNTPOINT_EXT2;
busybox mkdir -p /data/logs;
e2fsck -p -f -v $LOOPBACK > /data/logs/e2fsck_result.txt;
mount -t ext2 -o noatime,nodiratime,errors=continue $LOOPBACK $MOUNTPOINT_EXT2;

# mount the mountpoint
for i in app data system dalvik-cache; do
mount -o bind $MOUNTPOINT_EXT2/$i /data/$i;
done;
#busybox ln -s $MOUNTPOINT/app-private /data/app-private;
fi;

if [ -e $IMAGE_FILE_DATA_EXT3 ]; then
busybox mknod $LOOPBACK b 7 1;
busybox losetup $LOOPBACK $IMAGE_FILE_DATA_EXT3;
busybox mkdir -p $MOUNTPOINT_EXT3;
busybox mkdir -p /data/logs;
e2fsck -p -f -v $LOOPBACK > /data/logs/e2fsck_result.txt;
mount -t ext3 -o noatime,nodiratime,errors=continue $LOOPBACK $MOUNTPOINT_EXT3;

# mount the mountpoint
for i in app data system dalvik-cache; do
mount -o bind $MOUNTPOINT_EXT3/$i /data/$i;
done;
#busybox ln -s $MOUNTPOINT/app-private /data/app-private;
fi;

# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /data/$i ]; then rm -f /data/$i; fi
done;

# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /data/app/*.odex

# Zipalign
if [ -e /system/bin/zipalign ]; then
LOG_FILE=/data/logs/zipalign.log
if [ ! -d /data/logs ]; then
mkdir -p /data/logs;
fi;

if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;

echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
else
echo ZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
fi;