From 77ee8fc1717ecb7075f2f22edb6c0913059c6f15 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 30 Sep 2007 14:14:05 +0200 Subject: [PATCH 1/1] Adjust look'n'feel of testcd and improve error handling as well --- autoconfig.functions | 18 +++++++++--------- debian/changelog | 6 ++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/autoconfig.functions b/autoconfig.functions index aaffa23..9315172 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -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 diff --git a/debian/changelog b/debian/changelog index 3076028..a0f05d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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. -- 2.1.4