-# Additional checks for the N900
-E_N900_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"
- echo " I will be called automatically upon installation"
- echo " of busybox-power"
- exit 1
- fi
-}
-
-# N900-specific code executed prior to installing the enhanced binary
-E_N900_PREINST() {
- md5sum $INSTALLDIR/busybox.power | $EXECPWR awk '{ print $1 }' > $INSTALLDIR/busybox.power.md5
- md5sum /bin/busybox | $EXECPWR awk '{ print $1 }' > $INSTALLDIR/busybox.original.md5
-
- # Check whether busybox-power isn't installed already
- INSTBINARY_MD5=`$EXECPWR cat $INSTALLDIR/busybox.power.md5`
- ORIGBINARY_MD5=`$EXECPWR cat $INSTALLDIR/busybox.original.md5`
- if test "$INSTBINARY_MD5" == "$ORIGBINARY_MD5"
- then
- echo "warning: installed busybox binary matches the binary"
- echo " that is to be installed"
- if ! test -e $INSTALLDIR/busybox.original; then
- $EXECPWR cp /bin/busybox $INSTALLDIR/busybox.original; fi
- else
- $EXECPWR cp /bin/busybox $INSTALLDIR/busybox.original
+# Backup the original BusyBox binary
+BACKUP() {
+ if test ! -e /bin/busybox; then
+ # Scratchbox does not ship with BusyBox by default
+ return