|
|
|
@ -6,7 +6,7 @@ if [ -f /etc/mtab ] ; then
|
|
|
|
|
FINAL_FSTYPE=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $5}')
|
|
|
|
|
else
|
|
|
|
|
#Currently only Maverick, but log if something else does it..
|
|
|
|
|
touch /boot/uboot/debug/no_mtab
|
|
|
|
|
touch /boot/uboot/backup/no_mtab
|
|
|
|
|
FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}')
|
|
|
|
|
FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}')
|
|
|
|
|
fi
|
|
|
|
@ -33,8 +33,8 @@ rm -f /boot/uboot/uEnv.txt.bak || true
|
|
|
|
|
rm -f /boot/uboot/MLO || true
|
|
|
|
|
rm -f /boot/uboot/MLO.bak || true
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/uboot/cus/MLO ] ; then
|
|
|
|
|
mv /boot/uboot/cus/MLO /boot/uboot/MLO
|
|
|
|
|
if [ -f /boot/uboot/backup/MLO ] ; then
|
|
|
|
|
mv /boot/uboot/backup/MLO /boot/uboot/MLO
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#Restore, backup u-boot Bootloader?
|
|
|
|
@ -43,18 +43,18 @@ rm -f /boot/uboot/u-boot.bin.bak || true
|
|
|
|
|
rm -f /boot/uboot/u-boot.img || true
|
|
|
|
|
rm -f /boot/uboot/u-boot.img.bak || true
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/uboot/cus/u-boot.img ] ; then
|
|
|
|
|
mv /boot/uboot/cus/u-boot.img /boot/uboot/u-boot.img
|
|
|
|
|
if [ -f /boot/uboot/backup/u-boot.img ] ; then
|
|
|
|
|
mv /boot/uboot/backup/u-boot.img /boot/uboot/u-boot.img
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/uboot/cus/u-boot.bin ] ; then
|
|
|
|
|
mv /boot/uboot/cus/u-boot.bin /boot/uboot/u-boot.bin
|
|
|
|
|
if [ -f /boot/uboot/backup/u-boot.bin ] ; then
|
|
|
|
|
mv /boot/uboot/backup/u-boot.bin /boot/uboot/u-boot.bin
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f "/boot/uboot/cus/normal.txt" ] ; then
|
|
|
|
|
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/cus/normal.txt
|
|
|
|
|
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/cus/normal.txt
|
|
|
|
|
mv /boot/uboot/cus/normal.txt /boot/uboot/uEnv.txt
|
|
|
|
|
if [ -f "/boot/uboot/backup/normal.txt" ] ; then
|
|
|
|
|
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
mv /boot/uboot/backup/normal.txt /boot/uboot/uEnv.txt
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#Cleanup: some of Ubuntu's packages:
|
|
|
|
@ -77,5 +77,5 @@ cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
|
|
|
|
|
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
|
|
|
|
|
|
|
|
|
|
#Debug:
|
|
|
|
|
mount > /boot/uboot/debug/mount.log
|
|
|
|
|
mount > /boot/uboot/backup/mount.log
|
|
|
|
|
|
|
|
|
|