#!/bin/sh test "$1" = install || exit 0 # upgrades are fine # Detect environment if test -d /scratchbox; then echo "busybox-power: Scratchbox environment detected" ENVIRONMENT="SDK" else if test -e /proc/component_version; then PROD=$(cat /proc/component_version | grep product | cut -d" " -f 6) else PROD=$(/usr/bin/sysinfoclient --get /component/product | awk '{ print $3 }') fi case $PROD in RX-34|RX-44) echo "busybox-power: Maemo4 (N8x0) environment detected" ENVIRONMENT="DIABLO" ;; RX-51) echo "busybox-power: Maemo5 (N900) environment detected" ENVIRONMENT="FREMANTLE" ;; RM-680|RM-696) echo "busybox-power: MeeGo/Harmattan (N9/50) environment detected" ENVIRONMENT="HARMATTAN" ;; *) echo "busybox-power: unsupported environment: $PROD" exit 1 ;; esac fi # Don't show the warning message when the user wants an unattended installation, # if $DISPLAY is not set or $SSH_TTY is set if test -z "$DISPLAY" || test -n "$SSH_TTY" || test -e /tmp/.bbp-unattended then exit 0; fi # Warning message case $ENVIRONMENT in SDK) # Extra warning doesn't apply to SDK, just exit exit 0 ;; DIABLO|FREMANTLE) f=/tmp/busybox-power-msg cat > $f < $f < /dev/null 2>&1 res=$? rm -f $f exit $res ;; esac