]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/opie-taskbar/opie-taskbar/c7x0/opie
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / opie-taskbar / opie-taskbar / c7x0 / opie
1 #!/bin/sh
2 #
3 [ -z $LOGNAME ] && export LOGNAME=root && export HOME=/home/root
4 [ -z $HOME ] && export HOME=/home/$LOGNAME
5
6 # we need to tinker directly with qws_display until the ODevice
7 # default (which is now W100:Rot0:0) works flawlessly with rotation
8 # and survives a suspend/resume cycle
9 export QWS_DISPLAY=Transformed:Rot0:0
10 # export QWS_DISPLAY=W100:Rot0:0
11 export QTDIR=/opt/QtPalmtop
12 export OPIEDIR=/opt/QtPalmtop
13 export QPEDIR=/opt/QtPalmtop
14 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPIEDIR/lib
15 export PATH=$PATH:$OPIEDIR/bin
16
17 if [ ! -x "$OPIEDIR/bin/qpe" ] ; then 
18     echo Opie not installed
19     exit 0 
20 fi
21
22 . /etc/profile
23
24 for conf in $OPIEDIR/etc/skel/*.conf; do
25         conf_basename=`basename $conf`
26         if [ ! -e "$HOME/Settings/$conf_basename" ] ; then
27                 echo "Copying default $conf_basename into $HOME/Settings/"
28                 mkdir -p $HOME/Settings/
29                 cat $conf >$HOME/Settings/$conf_basename
30         fi
31 done
32
33 if [ ! -e "$HOME/systeminfo/linkver" ] ; then
34     mkdir -p $HOME/systeminfo/
35     echo "1.13" >$HOME/systeminfo/linkver
36 fi
37
38 if [ ! -e "/opt/Qtopia" ] ; then
39     ln -sf /opt/QtPalmtop /opt/Qtopia
40 fi
41
42 case $1 in
43 'start')
44     /sbin/getkey 5 "Starting Opie in 5 seconds... press key to interrupt." && exit 0
45     
46     if [ -x "$OPIEDIR/bin/opie-login" ]; then
47             echo Starting Opie-login....
48             $OPIEDIR/bin/opie-login -terminal 2
49     else
50         $OPIEDIR/bin/opie-reorgfiles
51         if [ -x /usr/bin/ssh-agent ]; then
52              SSHAGENT=/usr/bin/ssh-agent
53         else
54              SSHAGENT=""
55         fi
56         
57         if [ -x "$OPIEDIR/bin/opie-sh-ssh-askpass.sh" ]; then
58             export SSH_ASKPASS=$OPIEDIR/bin/opie-sh-ssh-askpass.sh
59         fi           
60         echo Starting Opie....
61         $SSHAGENT $OPIEDIR/bin/qpe -terminal 2
62     fi
63
64     ;;
65
66 'stop')
67     echo "Stopping Opie..."
68     killall qpe 2>/dev/null
69     killall opie-login 2>/dev/null
70     killall quicklauncher 2>/dev/null
71
72     ;;
73
74 'restart')
75         $0 stop && $0 start
76
77         ;;
78
79 *)
80     echo "usage: $0 { start | stop | restart }"
81
82     ;;
83
84 esac
85