Adjust look'n'feel of testcd and improve error handling as well
authorMichael Prokop <mika@grml.org>
Sun, 30 Sep 2007 12:14:05 +0000 (14:14 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 30 Sep 2007 12:14:05 +0000 (14:14 +0200)
autoconfig.functions
debian/changelog

index aaffa23..9315172 100755 (executable)
@@ -597,19 +597,19 @@ if [ -n "$TESTCD" ]; then
    [ -d /live/image/GRML ] && TESTCD_PATH=/live/image/GRML
 
    if [ -n "$TESTCD_PATH" ] ; then
-      ( cd "$TESTCD_PATH" ; rm -f /tmp/md5sum.log ; md5sum -c md5sums 2>&1 | tee /tmp/md5sum.log )
+      ( cd "$TESTCD_PATH" ; rm -f /tmp/md5sum.log ; md5sum -c md5sums 2>&1 | tee /tmp/md5sum.log ; RC=$? )
    else
       echo "${RED} *** Error: Could not find md5sum file.                           ***"
    fi
 
-   if [ "$?" = "0" ]; then
-     echo " ${GREEN}Everything looks OK${NORMAL}"
-     else
-     echo "${RED} *** CHECKSUM FAILED FOR THESE FILES:                          ***"
-     egrep -v '(^md5sum:|OK$)' /tmp/md5sum.log
-     echo "${RED} *** DATA ON YOUR CD MEDIUM IS POSSIBLY INCOMPLETE OR DAMAGED, ***${NORMAL}"
-     echo "${RED} *** OR YOUR COMPUTER HAS BAD RAM.                             ***${NORMAL}"
-     echo -n "${CYAN}Hit return to contine, or press the reset button to quit.${NORMAL}"
+   if [ "$RC" = "0" ]; then
+      einfo "Everything looks OK" ; eend 0
+   else
+      eerror 'Checksum failed for theses files:' ; eend 1
+      egrep -v '(^md5sum:|OK$)' /tmp/md5sum.log
+      eerror 'Data on the grml medium is possibly incomplete/damaged or...'
+      eerror '... RAM of your computer is broken.' ; eend 1
+      einfon "Hit return to continue, or press the reset button to quit."
      read a
    fi
 
index 3076028..a0f05d5 100644 (file)
@@ -1,3 +1,9 @@
+grml-autoconfig (0.7.24) unstable; urgency=low
+
+  * Adjust look'n'feel of testcd and improve error handling as well.
+
+ -- Michael Prokop <mika@grml.org>  Sun, 30 Sep 2007 14:13:45 +0200
+
 grml-autoconfig (0.7.23) unstable; urgency=low
 
   * Add acpi-support to Recommends and depend on console-tools.