summaryrefslogtreecommitdiff
path: root/root
Unidiff
Diffstat (limited to 'root') (more/less context) (ignore whitespace changes)
-rwxr-xr-xroot/etc/init.d/opie36
1 files changed, 14 insertions, 22 deletions
diff --git a/root/etc/init.d/opie b/root/etc/init.d/opie
index d49498c..df68090 100755
--- a/root/etc/init.d/opie
+++ b/root/etc/init.d/opie
@@ -1,87 +1,79 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3 3
4[ -z $LOGNAME ] && export LOGNAME=root && export HOME=/root 4[ -z $LOGNAME ] && export LOGNAME=root && export HOME=/root
5[ -z $HOME ] && export HOME=/$LOGNAME 5[ -z $HOME ] && export HOME=/$LOGNAME
6 6
7export QTDIR=/opt/QtPalmtop 7export QTDIR=/opt/QtPalmtop
8export OPIEDIR=/opt/QtPalmtop 8export OPIEDIR=/opt/QtPalmtop
9export QPEDIR=/opt/QtPalmtop 9export QPEDIR=/opt/QtPalmtop
10export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPIEDIR/lib 10export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPIEDIR/lib
11export PATH=$PATH:$OPIEDIR/bin 11export PATH=$PATH:$OPIEDIR/bin
12 12
13if [ -e /proc/hal/model ] ; then 13if [ -e /proc/cpuinfo ] ; then
14 ipaq=`cat /proc/hal/model` 14 model=`grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
15 15
16 case "$ipaq" in 16 case "$model" in
17 "3100" ) export QWS_DISPLAY=Transformed:Rot90:0 ;; 17 "HP IPAQ H3100" | "HP IPAQ H3800" )
18 "3600" ) export QWS_DISPLAY=Transformed:Rot270:0 ;; 18 export QWS_DISPLAY=Transformed:Rot90:0 ;;
19 "3700" ) export QWS_DISPLAY=Transformed:Rot270:0 ;; 19 "HP IPAQ H5400" | "HP JORNADA 56X" | "HP IPAQ H2200" )
20 "3800" ) export QWS_DISPLAY=Transformed:Rot90:0 ;; 20 export QWS_DISPLAY=Transformed:Rot0:0 ;;
21 "3900" ) export QWS_DISPLAY=Transformed:Rot270:0 ;; 21 *SIMPAD* )
22 "5400" ) export QWS_DISPLAY=Transformed:Rot0:0 ;; 22 export QWS_KEYBOARD='SIMpad'
23 *) echo "Unknown iPAQ model: $ipaq" ;; 23 export QWS_DISPLAY=Transformed:Rot0:0 ;;
24
25 *)
26 export QWS_DISPLAY=Transformed:Rot270:0 ;;
24 esac 27 esac
25else 28else
26 export QWS_DISPLAY=Transformed:Rot270:0 29 export QWS_DISPLAY=Transformed:Rot270:0
27fi 30fi
28 31
29if [ -e /proc/cpuinfo ] ; then
30 if (grep -qi "Simpad" /proc/cpuinfo) ; then
31 export QWS_KEYBOARD='SIMpad'
32 export QWS_DISPLAY=Transformed:Rot0:0
33 fi
34 if (grep -qi "HP Jornada 56x" /proc/cpuinfo) ; then
35 export QWS_DISPLAY=Transformed:Rot0:0
36 fi
37fi
38
39
40if [ ! -x $OPIEDIR/bin/qpe ] ; then 32if [ ! -x $OPIEDIR/bin/qpe ] ; then
41 echo Opie not installed 33 echo Opie not installed
42 exit 0 34 exit 0
43fi 35fi
44 36
45. /etc/profile 37. /etc/profile
46 38
47case $1 in 39case $1 in
48'start') 40'start')
49 cd $HOME 41 cd $HOME
50 rm -f /etc/rc2.d/S99x # Can't have both running! 42 rm -f /etc/rc2.d/S99x # Can't have both running!
51 43
52 if [ -x $OPIEDIR/bin/opie-login ]; then 44 if [ -x $OPIEDIR/bin/opie-login ]; then
53 if ! killall -0 syslogd 2>/dev/null >/dev/null; then 45 if ! killall -0 syslogd 2>/dev/null >/dev/null; then
54 echo Starting Opie-login.... 46 echo Starting Opie-login....
55 $OPIEDIR/bin/opie-login 2>/dev/null >/dev/null & 47 $OPIEDIR/bin/opie-login 2>/dev/null >/dev/null &
56 else 48 else
57 echo Starting Opie-login with syslog logging..... 49 echo Starting Opie-login with syslog logging.....
58 ( $OPIEDIR/bin/opie-login 2>&1 | logger ) & 50 ( $OPIEDIR/bin/opie-login 2>&1 | logger ) &
59 fi 51 fi
60 else 52 else
61 $OPIEDIR/bin/opie-reorgfiles 53 $OPIEDIR/bin/opie-reorgfiles
62 if [ -x /usr/bin/ssh-agent ]; then 54 if [ -x /usr/bin/ssh-agent ]; then
63 SSHAGENT=/usr/bin/ssh-agent 55 SSHAGENT=/usr/bin/ssh-agent
64 else 56 else
65 SSHAGENT="" 57 SSHAGENT=""
66 fi 58 fi
67 59
68 if [ -x $OPIEDIR/bin/opie-sh-ssh-askpass.sh ]; then 60 if [ -x $OPIEDIR/bin/opie-sh-ssh-askpass.sh ]; then
69 export SSH_ASKPASS=$OPIEDIR/bin/opie-sh-ssh-askpass.sh 61 export SSH_ASKPASS=$OPIEDIR/bin/opie-sh-ssh-askpass.sh
70 fi 62 fi
71 63
72 if ! killall -0 syslogd 2>/dev/null >/dev/null; then 64 if ! killall -0 syslogd 2>/dev/null >/dev/null; then
73 echo Starting Opie.... 65 echo Starting Opie....
74 $SSHAGENT $OPIEDIR/bin/qpe 2>/dev/null >/dev/null & 66 $SSHAGENT $OPIEDIR/bin/qpe 2>/dev/null >/dev/null &
75 else 67 else
76 echo Starting Opie with syslog logging..... 68 echo Starting Opie with syslog logging.....
77 ( $SSHAGENT $OPIEDIR/bin/qpe 2>&1 | logger ) & 69 ( $SSHAGENT $OPIEDIR/bin/qpe 2>&1 | logger ) &
78 fi 70 fi
79 fi 71 fi
80 72
81 ;; 73 ;;
82 74
83'stop') 75'stop')
84 echo "Killing Opie..." 76 echo "Killing Opie..."
85 killall qpe 77 killall qpe
86 killall opie-login 78 killall opie-login
87 79