sync
ls /tmp/wget2nand-boot/
ls /tmp/wget2nand/
+# use kexec if present
+[ -x /usr/bin/kexec ] && {
+ kexec -l /tmp/wget2nand-boot/kernel --command-line="$(cat /proc/cmdline) root=$main rootfstype=yaffs2"
+ kexec -e
+}
+
# unmount the partitions and remove the directories into which they were mounted
umount /tmp/wget2nand-boot
umount /tmp/wget2nand