modify warning messages, include more information
[busybox-power] / debian / busybox-power.prerm
index 3659037..a0d4ea1 100644 (file)
@@ -50,17 +50,17 @@ CHECK_BACKUP() {
           if test "`cat $INSTALLDIR/busybox.distrib.version`" == "`GETBBVERSION`"; then
             # The backup has been changed whilst busybox hasn't been upgraded
             echo -e "Warning: the backup of the original BusyBox binary has" \
-              "been modified since installing busybox-power (invalid SHA1" \
-              "checksum). Do not continue unless you're sure that $DISTBIN" \
-              "is not corrupted.\n" >> /tmp/busybox-power-error
+              "been modified since installing busybox-power. Do not continue" \
+              "unless you're sure that $DISTBIN is not corrupted.\n" \
+              >> /tmp/busybox-power-error
           fi
         else
           echo -e "Warning: the backup of the original BusyBox binary has" \
-          "been modified since installing busybox-power (invalid SHA1" \
-          "checksum). We could not determine whether this is due to a BusyBox" \
-          "upgrade (e.g. by an (C)SSU update) or not. Do not continue unless" \
-          "either the latter is the case, or you're via other ways sure that" \
-          "$DISTBIN is not corrupted.\n" >> /tmp/busybox-power-error
+          "been modified since installing busybox-power. We could not" \
+          "determine whether this is due to a BusyBox upgrade (e.g. by an" \
+          "(C)SSU update) or not. Do not continue unless either the latter is" \
+          "the case, or you're via other ways sure that $DISTBIN is not" \
+          "corrupted.\n" >> /tmp/busybox-power-error
         fi
       fi
     else
@@ -85,16 +85,17 @@ CHECK_INSTALLEDBIN() {
             return
           fi
         fi
-        echo -e "Warning: /bin/busybox has been modified since installing" \
-          "busybox-power (invalid SHA1 checksum). This can be the result of a" \
-          "BusyBox upgrade (e.g. by a Meego update). Your current" \
-          "/bin/busybox won't be touched. Our backup of the original BusyBox" \
-          "binary will be left at $DISTBIN.\n" >> /tmp/busybox-power-error
+        echo -e "Warning: /bin/busybox does not match busybox-power's binary" \
+          "This can be the result of a BusyBox upgrade (e.g. by a MeeGo" \
+          "update), an unsuccessful busybox-power installation, or a manual" \
+          "replacement of it. Your current /bin/busybox won't be touched. Our" \
+          "backup of the original BusyBox binary will be left at $DISTBIN.\n" \
+          >> /tmp/busybox-power-error
       else
-        echo -e "Warning: /bin/busybox has been modified since installing" \
-          "busybox-power (invalid SHA1 checksum). Your current /bin/busybox" \
-          "won't be touched and the diversion of /bin/busybox to $DISTBIN" \
-          "will not be removed.\n" >> /tmp/busybox-power-error
+        echo -e "Warning: /bin/busybox does not match busybox-power's binary." \
+          "Your current /bin/busybox won't be touched and the diversion of" \
+          "/bin/busybox to $DISTBIN will not be removed.\n" \
+          >> /tmp/busybox-power-error
       fi
     fi
 }
@@ -110,7 +111,7 @@ DISPLAY_ERRORS() {
         echo "   Hit [ctrl-c] to break"
         read 
         ;;
-      FREMANTLE)
+      DIABLO|FREMANTLE)
         echo "Click \"I Agree\" to ignore the above errors/warnings. Ask for" \
           "help if you don't know what to do." >> /tmp/busybox-power-error
         echo "Please confirm the text on the screen of your device"
@@ -123,7 +124,10 @@ DISPLAY_ERRORS() {
         echo "Click \"I Agree\" to ignore the above errors/warnings. Ask for" \
           "help if you don't know what to do." >> /tmp/busybox-power-error
         echo "Please confirm the text on the screen of your device"
-        meego-confirm-text "Attention!" /tmp/busybox-power-error > /dev/null 2>&1
+        # We're too privileged to call meego-confirm-text...
+        # Our source is com.nokia.maemo, whilst m-c-t is from an unknown source
+        /usr/bin/aegis-exec meego-confirm-text "Attention!" \
+          /tmp/busybox-power-error > /dev/null 2>&1
         res=$?
         rm /tmp/busybox-power-error
         if test ! $res == 0; then exit 1; fi
@@ -149,7 +153,7 @@ UNINSTALL() {
     fi
 
     case $ENVIRONMENT in
-      SDK|FREMANTLE)
+      SDK|DIABLO|FREMANTLE)
         if test -e $DISTBIN; then
           cp -af $DISTBIN /bin/busybox
           if test -e /bin/busybox; then