use platform names in installation scripts
authorDennis Groenen <tj.groenen@gmail.com>
Fri, 24 Aug 2012 10:37:06 +0000 (12:37 +0200)
committerDennis Groenen <tj.groenen@gmail.com>
Fri, 24 Aug 2012 10:37:06 +0000 (12:37 +0200)
debian/busybox-power.preinst
debian/scripts/install-binary.sh
debian/scripts/uninstall-binary.sh

index 52b7684..70c17bb 100644 (file)
@@ -12,7 +12,7 @@ else
   case $PROD in
     RX-51)
       echo "busybox-power: Maemo (N900) environment detected"
-      ENVIRONMENT="N900"
+      ENVIRONMENT="FREMANTLE"
       ;;
     *)
       # Unsupported, use the least strict environment (SDK)
@@ -27,7 +27,7 @@ case $ENVIRONMENT in
     # Extra warning doesn't apply to SDK, just exit
     exit 0
     ;;
-  N900)
+  FREMANTLE)
     f=/tmp/busybox-power-msg
     cat > $f <<EOF
 Warning: This package touches an essential system binary!
index d45caae..b010e08 100755 (executable)
@@ -32,7 +32,7 @@ CHECK_ENV() {
       PROD=$($EXECPWR cat /proc/component_version | $EXECPWR grep product | $EXECPWR cut -d" " -f 6)
       case $PROD in
         RX-51)
-          ENVIRONMENT="N900"
+          ENVIRONMENT="FREMANTLE"
           ;;
         *)
           # Unsupported, use the least strict environment (SDK)
@@ -64,8 +64,8 @@ GENERIC_CHECKS() {
     fi
 }
 
-# Additional checks for the N900
-E_N900_CHECKS() {
+# Additional checks for Fremantle
+E_FREMANTLE_CHECKS() {
     if test "`$EXECPWR id -u`" -ne 0; then
       echo "error: you're not running me as root, aborting"
       echo "  also, DO NOT run me as a stand-alone application"
@@ -75,8 +75,8 @@ E_N900_CHECKS() {
     fi
 }
 
-# N900-specific code executed prior to installing the enhanced binary
-E_N900_PREINST() {
+# Fremantle-specific code executed prior to installing the enhanced binary
+E_FREMANTLE_PREINST() {
     $EXECPWR md5sum $INSTALLDIR/busybox.power | $EXECPWR awk '{ print $1 }' \
       > $INSTALLDIR/busybox.power.md5
     $EXECPWR md5sum /bin/busybox | $EXECPWR awk '{ print $1 }' \
@@ -179,9 +179,9 @@ case $ENVIRONMENT in
   SDK)
     E_SDK_PREINST
     ;;
-  N900)
-    E_N900_CHECKS
-    E_N900_PREINST
+  FREMANTLE)
+    E_FREMANTLE_CHECKS
+    E_FREMANTLE_PREINST
     ;;
 esac
 INSTALL
index c0eecc5..b770047 100755 (executable)
@@ -30,7 +30,7 @@ CHECK_ENV() {
       PROD=$(cat /proc/component_version | grep product | cut -d" " -f 6)
       case $PROD in
         RX-51)
-          ENVIRONMENT="N900"
+          ENVIRONMENT="FREMANTLE"
           ;;
         *)
           # Unsupported, use the least strict environment (SDK)
@@ -55,8 +55,8 @@ GENERIC_CHECKS() {
     fi
 }
 
-# Additional checks for the N900
-E_N900_CHECKS() {
+# Additional checks for Fremantle
+E_FREMANTLE_CHECKS() {
     if test "`id -u`" -ne 0; then
       echo "error: you're not running me as root, aborting"
       echo "  also, DO NOT run me as a stand-alone application"
@@ -70,8 +70,8 @@ E_N900_CHECKS() {
     fi
 }
 
-# N900-specific code executed prior to uninstalling the enhanced binary
-E_N900_PRERM() {
+# Fremantle-specific code executed prior to uninstalling the enhanced binary
+E_FREMANTLE_PRERM() {
     if test -e $INSTALLDIR/busybox.power.md5; then
       INSTBINARY_MD5=`md5sum /bin/busybox | awk '{ print $1 }'`
       ORIGBINARY_MD5=`cat $INSTALLDIR/busybox.power.md5`
@@ -102,7 +102,7 @@ DISPLAY_ERRORS() {
         echo "   Hit [ctrl-c] to break"
         read 
         ;;
-      N900)
+      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"
         maemo-confirm-text "Attention!" /tmp/busybox-power-error
@@ -188,9 +188,9 @@ ECHO_VERBOSE "  version string: `$EXECPWR | $EXECPWR head -n 1`"
 CHECK_ENV && ECHO_VERBOSE "  environment: $ENVIRONMENT"
 GENERIC_CHECKS
 case $ENVIRONMENT in
-  N900)
-    E_N900_CHECKS
-    E_N900_PRERM
+  FREMANTLE)
+    E_FREMANTLE_CHECKS
+    E_FREMANTLE_PRERM
     ;;
 esac
 if test -e /tmp/busybox-power-error; then