Hi,

I was finally getting around to upgrading my NanoNote to the latest image, so I ran reflash_ben.sh with the assumption that it would use the files I had manually downloaded earlier (on a faster network) and put in the right directory (under ~/.qi).

Instead, it deleted the files I had downloaded and started re-downloading them.

Looking at it, I found out that it doesn't check the md5sum of the downloaded .ubi.bz2 rootfs file, but the md5sum of the decompressed .ubi file - which naturally didn't exist, since I had only downloaded it, not decompressed it.

Hence this patch - which adds that, before checking the md5sums, it looks for the .ubi file, and if it doesn't find it but does find the .ubi.bz2 file, decompresses that.

--
Regards,
Frode Austvik
--- reflash_ben.orig.sh	2011-12-11 19:32:10.742512808 +0100
+++ reflash_ben.sh	2011-12-11 20:08:28.607450891 +0100
@@ -172,6 +172,11 @@
     MD5SUMS_SERVER=$(wget -O - ${BASE_URL_HTTP}/${VERSION}/md5sums 2> /dev/null | grep -E "(${LOADER}|${KERNEL}|${ROOTFS})" | sort)
     [ "${MD5SUMS_SERVER}" ] || abort "can't fetch files from server"
     
+    if [ ! -f "${WORKING_DIR}/${ROOTFS}" ] && [ -f "${WORKING_DIR}/${ROOTFS}.bz2" ] ; then
+    	log "found .ubi.bz2 rootfs, decompressing to .ubi"
+    	(cd "${WORKING_DIR}"; bzip2 -d "${ROOTFS}.bz2")
+    fi
+    
     MD5SUMS_LOCAL=$( (cd "${WORKING_DIR}" ; md5sum --binary "${LOADER}" "${KERNEL}" "${ROOTFS}" 2> /dev/null) | sort )
 
     if [ "${MD5SUMS_SERVER}" == "${MD5SUMS_LOCAL}" ]; then
_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): [email protected]
Subscribe or Unsubscribe: 
http://lists.en.qi-hardware.com/mailman/listinfo/discussion

Reply via email to