done
# End determine root device
-verbose_kmsg
+#verbose_kmsg
# If cdroot is set determine the looptype to boot
if [ "${CDROOT}" = '1' ]
CHROOT=${CHROOT}/${SUBDIR}
fi
+verbose_kmsg
+
if [ "$0" = '/linuxrc' ]
then
[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
fi
INITRAMFS_FILES=$(echo ${INITRAMFS_FILES}|sed -e "s|newroot||g")
- (sleep 10; cd /; rm -rf ${INITRAMFS_FILES}) &
-
+ for i in ${INITRAMFS_FILES}
+ do
+ for j in $(/bin/busybox find /$i)
+ do
+ #/bin/busybox echo "$j"
+ if /bin/busybox [ ! -d "$j" -a "$j" != "/bin/busybox" ]
+ then
+ /bin/busybox rm "$j"
+ fi
+ done
+ for j in $(/bin/busybox find /$i)
+ do
+ if /bin/busybox [ -d ${j} -a "${j}" != "/bin" ]
+ then
+ /bin/busybox rm -r "$j"
+ fi
+ done
+ done
# End initramfs cleanup
# Start the real root init
-
- exec chroot . /bin/sh <<- EOF
+ (/bin/busybox sleep 2;/bin/busybox rm /bin/busybox) &
+ exec /bin/busybox chroot . /bin/sh <<- EOF
exec /sbin/init ${REAL_INIT}
EOF