echo "Loading code..."

# now using a tarball passed in
cd /mnt/ramdisk

#pull off the update.sh off the code load file.
./update.sh | tee /tmp/codeload.progress

if [ $? != 0 ]; then
    echo "Code load failed!";
    exit 1;
fi

echo "Code load complete."

# // so messaging can get out
sleep 2

if [ -f do.reboot ]
then
    sync;
    sync;
    reboot;
fi

if [ ! -f do.keep ]
then
    cd /
    umount /mnt/ramdisk
fi

exit 0;

