summaryrefslogtreecommitdiff
authorsandman <sandman>2002-07-27 23:33:26 (UTC)
committer sandman <sandman>2002-07-27 23:33:26 (UTC)
commit4baf36396739502c5471950e29f18954cca4517b (patch) (unidiff)
tree46b25659b442666b4b5153fa8210d86e6708b47b
parent9cc89b6a54ee267953b0422c4607097d075ecab9 (diff)
downloadopie-4baf36396739502c5471950e29f18954cca4517b.zip
opie-4baf36396739502c5471950e29f18954cca4517b.tar.gz
opie-4baf36396739502c5471950e29f18954cca4517b.tar.bz2
Update for OPIE to use opie-login
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile1
-rw-r--r--core/launcher/main.cpp12
-rw-r--r--core/opie-login/opie-login.control9
-rwxr-xr-xroot/etc/init.d/opie7
4 files changed, 16 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 28e5c41..367cfda 100644
--- a/Makefile
+++ b/Makefile
@@ -1,84 +1,85 @@
1indefault: dynamic 1indefault: dynamic
2 2
3all: default docs 3all: default docs
4 4
5LIBS=library libopie 5LIBS=library libopie
6 6
7 7
8INPUTCOMPONENTS= inputmethods/keyboard inputmethods/pickboard \ 8INPUTCOMPONENTS= inputmethods/keyboard inputmethods/pickboard \
9 inputmethods/handwriting inputmethods/unikeyboard \ 9 inputmethods/handwriting inputmethods/unikeyboard \
10 inputmethods/jumpx inputmethods/kjumpx \ 10 inputmethods/jumpx inputmethods/kjumpx \
11 inputmethods/dvorak 11 inputmethods/dvorak
12 12
13APPLETS= core/applets/batteryapplet core/applets/batteryapplet-ipaq \ 13APPLETS= core/applets/batteryapplet core/applets/batteryapplet-ipaq \
14 core/applets/irdaapplet core/applets/volumeapplet \ 14 core/applets/irdaapplet core/applets/volumeapplet \
15 core/applets/clockapplet core/applets/netmonapplet \ 15 core/applets/clockapplet core/applets/netmonapplet \
16 core/applets/screenshotapplet core/applets/clipboardapplet \ 16 core/applets/screenshotapplet core/applets/clipboardapplet \
17 core/applets/cardmon core/applets/obex \ 17 core/applets/cardmon core/applets/obex \
18 core/applets/vmemo noncore/net/netsetup/dialup \ 18 core/applets/vmemo noncore/net/netsetup/dialup \
19 noncore/net/netsetup/lan 19 noncore/net/netsetup/lan
20 20
21MAIL= noncore/mail/libmail noncore/mail/bend 21MAIL= noncore/mail/libmail noncore/mail/bend
22 22
23PLAYER = core/multimedia/opieplayer/libmpeg3 \ 23PLAYER = core/multimedia/opieplayer/libmpeg3 \
24 core/multimedia/opieplayer/libmad \ 24 core/multimedia/opieplayer/libmad \
25 core/multimedia/opieplayer/wavplugin \ 25 core/multimedia/opieplayer/wavplugin \
26 core/multimedia/opieplayer/modplug 26 core/multimedia/opieplayer/modplug
27 27
28 COMPONENTS=$(LOCALCOMPONENTS) $(INPUTCOMPONENTS) $(APPLETS) $(MAIL) $(PLAYER) 28 COMPONENTS=$(LOCALCOMPONENTS) $(INPUTCOMPONENTS) $(APPLETS) $(MAIL) $(PLAYER)
29 29
30 30
31PIMAPPS = core/pim/addressbook core/pim/datebook \ 31PIMAPPS = core/pim/addressbook core/pim/datebook \
32 core/pim/today core/pim/todo 32 core/pim/today core/pim/todo
33 33
34COREAPPS = core/apps/filebrowser core/apps/helpbrowser \ 34COREAPPS = core/apps/filebrowser core/apps/helpbrowser \
35 core/apps/textedit core/apps/embeddedkonsole \ 35 core/apps/textedit core/apps/embeddedkonsole \
36 core/launcher \ 36 core/launcher \
37 core/opie-login \
37 core/apps/oipkg core/apps/qcop 38 core/apps/oipkg core/apps/qcop
38 39
39COREMULTIMEDIA = core/multimedia/opieplayer 40COREMULTIMEDIA = core/multimedia/opieplayer
40 41
41CORESETTINGS = core/settings/light-and-power core/settings/security \ 42CORESETTINGS = core/settings/light-and-power core/settings/security \
42 core/settings/systemtime core/settings/citytime \ 43 core/settings/systemtime core/settings/citytime \
43 44
44NONCORESETTINGS =noncore/settings/language noncore/settings/rotation \ 45NONCORESETTINGS =noncore/settings/language noncore/settings/rotation \
45 noncore/settings/appearance noncore/settings/sound \ 46 noncore/settings/appearance noncore/settings/sound \
46 noncore/settings/mediummount \ 47 noncore/settings/mediummount \
47 noncore/settings/tabmanager noncore/settings/appskey \ 48 noncore/settings/tabmanager noncore/settings/appskey \
48 noncore/settings/netsystemtime \ 49 noncore/settings/netsystemtime \
49 noncore/settings/wlansetup \ 50 noncore/settings/wlansetup \
50 51
51NONCORETOOLS = noncore/tools/calculator noncore/tools/clock \ 52NONCORETOOLS = noncore/tools/calculator noncore/tools/clock \
52 noncore/tools/remote noncore/tools/opie-sh noncore/apps/advancedfm 53 noncore/tools/remote noncore/tools/opie-sh noncore/apps/advancedfm
53 54
54NONCORESTYLES = noncore/styles/liquid noncore/styles/theme noncore/styles/metal 55NONCORESTYLES = noncore/styles/liquid noncore/styles/theme noncore/styles/metal
55 56
56GAMES = noncore/games/minesweep noncore/games/solitaire \ 57GAMES = noncore/games/minesweep noncore/games/solitaire \
57 noncore/games/tetrix noncore/games/wordgame \ 58 noncore/games/tetrix noncore/games/wordgame \
58 noncore/games/parashoot noncore/games/snake \ 59 noncore/games/parashoot noncore/games/snake \
59 noncore/games/mindbreaker \ 60 noncore/games/mindbreaker \
60 noncore/games/go noncore/games/qasteroids \ 61 noncore/games/go noncore/games/qasteroids \
61 noncore/games/fifteen noncore/games/tictac \ 62 noncore/games/fifteen noncore/games/tictac \
62 noncore/games/kcheckers noncore/games/kpacman \ 63 noncore/games/kcheckers noncore/games/kpacman \
63 noncore/games/kbill 64 noncore/games/kbill
64 65
65NONAPPS = noncore/apps/opie-sheet noncore/apps/tableviewer \ 66NONAPPS = noncore/apps/opie-sheet noncore/apps/tableviewer \
66 noncore/apps/opie-reader noncore/apps/checkbook \ 67 noncore/apps/opie-reader noncore/apps/checkbook \
67 noncore/apps/sysinfo \ 68 noncore/apps/sysinfo \
68 69
69NONNET = noncore/net/netsetup noncore/net/opieftp \ 70NONNET = noncore/net/netsetup noncore/net/opieftp \
70 noncore/mail 71 noncore/mail
71 72
72NONMULT = noncore/multimedia/showimg noncore/graphics/drawpad \ 73NONMULT = noncore/multimedia/showimg noncore/graphics/drawpad \
73 noncore/graphics/qpdf noncore/apps/confedit 74 noncore/graphics/qpdf noncore/apps/confedit
74 75
75 76
76NONCOMM = noncore/comm/keypebble 77NONCOMM = noncore/comm/keypebble
77 78
78APPS=$(LOCALAPPS) $(PIMAPPS) $(COREAPPS) \ 79APPS=$(LOCALAPPS) $(PIMAPPS) $(COREAPPS) \
79 $(COREMULTIMEDIA) $(CORESETTINGS) \ 80 $(COREMULTIMEDIA) $(CORESETTINGS) \
80 $(NONCORESETTINGS) $(NONCORETOOLS) $(NONCORESTYLES) \ 81 $(NONCORESETTINGS) $(NONCORETOOLS) $(NONCORESTYLES) \
81 $(NONAPPS) $(NONNET) $(NONMULT) \ 82 $(NONAPPS) $(NONNET) $(NONMULT) \
82 $(NONCOMM) $(GAMES) 83 $(NONCOMM) $(GAMES)
83 84
84 85
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index b3c331b..a19da14 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -1,99 +1,95 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "desktop.h" 21#include "desktop.h"
22#include "taskbar.h" 22#include "taskbar.h"
23#include "stabmon.h" 23#include "stabmon.h"
24 24
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/network.h> 26#include <qpe/network.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) 28#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
29#include <qpe/custom.h> 29#include <qpe/custom.h>
30#endif 30#endif
31 31
32#include <opie/odevice.h> 32#include <opie/odevice.h>
33 33
34#include <qfile.h> 34#include <qfile.h>
35#include <qwindowsystem_qws.h> 35#include <qwindowsystem_qws.h>
36#include <qpe/qcopenvelope_qws.h> 36#include <qpe/qcopenvelope_qws.h>
37#include <qpe/alarmserver.h> 37#include <qpe/alarmserver.h>
38 38
39#include <stdlib.h> 39#include <stdlib.h>
40#include <stdio.h> 40#include <stdio.h>
41#include <signal.h> 41#include <signal.h>
42#include <unistd.h> 42#include <unistd.h>
43 43
44#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 44#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
45#include "../calibrate/calibrate.h" 45#include "../calibrate/calibrate.h"
46#endif 46#endif
47 47
48#ifdef QT_QWS_LOGIN
49#include "../login/qdmdialogimpl.h"
50#endif
51
52#ifdef QT_QWS_CASSIOPEIA 48#ifdef QT_QWS_CASSIOPEIA
53static void ignoreMessage( QtMsgType, const char * ) 49static void ignoreMessage( QtMsgType, const char * )
54{ 50{
55} 51}
56#include <sys/mount.h> 52#include <sys/mount.h>
57#include <sys/types.h> 53#include <sys/types.h>
58#include <sys/stat.h> 54#include <sys/stat.h>
59#include <sys/time.h> 55#include <sys/time.h>
60#include <fcntl.h> 56#include <fcntl.h>
61#include <qdatetime.h> 57#include <qdatetime.h>
62 58
63void initCassiopeia() 59void initCassiopeia()
64{ 60{
65 // MIPSEL-specific init - make sure /proc exists for shm 61 // MIPSEL-specific init - make sure /proc exists for shm
66/* 62/*
67 if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) { 63 if ( mount("/dev/ram0", "/", "ext2", MS_REMOUNT | MS_MGC_VAL, 0 ) ) {
68 perror("Remounting - / read/write"); 64 perror("Remounting - / read/write");
69 } 65 }
70*/ 66*/
71 if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) { 67 if ( mount("none", "/tmp", "ramfs", 0, 0 ) ) {
72 perror("mounting ramfs /tmp"); 68 perror("mounting ramfs /tmp");
73 } else { 69 } else {
74 fprintf( stderr, "mounted /tmp\n" ); 70 fprintf( stderr, "mounted /tmp\n" );
75 } 71 }
76 if ( mount("none", "/home", "ramfs", 0, 0 ) ) { 72 if ( mount("none", "/home", "ramfs", 0, 0 ) ) {
77 perror("mounting ramfs /home"); 73 perror("mounting ramfs /home");
78 } else { 74 } else {
79 fprintf( stderr, "mounted /home\n" ); 75 fprintf( stderr, "mounted /home\n" );
80 } 76 }
81 if ( mount("none","/proc","proc",0,0) ) { 77 if ( mount("none","/proc","proc",0,0) ) {
82 perror("Mounting - /proc"); 78 perror("Mounting - /proc");
83 } else { 79 } else {
84 fprintf( stderr, "mounted /proc\n" ); 80 fprintf( stderr, "mounted /proc\n" );
85 } 81 }
86 if ( mount("none","/mnt","shm",0,0) ) { 82 if ( mount("none","/mnt","shm",0,0) ) {
87 perror("Mounting - shm"); 83 perror("Mounting - shm");
88 } 84 }
89 setenv( "QTDIR", "/", 1 ); 85 setenv( "QTDIR", "/", 1 );
90 setenv( "OPIEDIR", "/", 1 ); 86 setenv( "OPIEDIR", "/", 1 );
91 setenv( "HOME", "/home", 1 ); 87 setenv( "HOME", "/home", 1 );
92 mkdir( "/home/Documents", 0755 ); 88 mkdir( "/home/Documents", 0755 );
93 89
94 // set a reasonable starting date 90 // set a reasonable starting date
95 QDateTime dt( QDate( 2001, 3, 15 ) ); 91 QDateTime dt( QDate( 2001, 3, 15 ) );
96 QDateTime now = QDateTime::currentDateTime(); 92 QDateTime now = QDateTime::currentDateTime();
97 int change = now.secsTo( dt ); 93 int change = now.secsTo( dt );
98 94
99 time_t t = ::time(0); 95 time_t t = ::time(0);
@@ -258,104 +254,96 @@ public:
258 return kill; 254 return kill;
259 } 255 }
260 256
261 virtual void timerEvent ( QTimerEvent * ) 257 virtual void timerEvent ( QTimerEvent * )
262 { 258 {
263 killTimer ( m_power_timer ); 259 killTimer ( m_power_timer );
264 m_power_timer = 0; 260 m_power_timer = 0;
265 QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false ); 261 QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false );
266 QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false ); 262 QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false );
267 } 263 }
268 264
269private: 265private:
270 OModel m_model; 266 OModel m_model;
271 int m_power_timer; 267 int m_power_timer;
272}; 268};
273 269
274 270
275 271
276int initApplication( int argc, char ** argv ) 272int initApplication( int argc, char ** argv )
277{ 273{
278#ifdef QT_QWS_CASSIOPEIA 274#ifdef QT_QWS_CASSIOPEIA
279 initCassiopeia(); 275 initCassiopeia();
280#endif 276#endif
281 277
282#ifdef QPE_OWNAPM 278#ifdef QPE_OWNAPM
283 initAPM(); 279 initAPM();
284#endif 280#endif
285 281
286#ifdef QT_DEMO_SINGLE_FLOPPY 282#ifdef QT_DEMO_SINGLE_FLOPPY
287 initFloppy(); 283 initFloppy();
288#endif 284#endif
289 285
290 initEnvironment(); 286 initEnvironment();
291 287
292#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) 288#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX)
293 setenv( "QWS_SIZE", "240x320", 0 ); 289 setenv( "QWS_SIZE", "240x320", 0 );
294#endif 290#endif
295 291
296 //Don't flicker at startup: 292 //Don't flicker at startup:
297 QWSServer::setDesktopBackground( QImage() ); 293 QWSServer::setDesktopBackground( QImage() );
298 DesktopApplication a( argc, argv, QApplication::GuiServer ); 294 DesktopApplication a( argc, argv, QApplication::GuiServer );
299 295
300 (void) new ModelKeyFilter ( ); 296 (void) new ModelKeyFilter ( );
301 297
302 initBacklight(); 298 initBacklight();
303 299
304 AlarmServer::initialize(); 300 AlarmServer::initialize();
305 301
306#if defined(QT_QWS_LOGIN)
307 for( int i=0; i<a.argc(); i++ )
308 if( strcmp( a.argv()[i], "-login" ) == 0 ) {
309 QDMDialogImpl::login( );
310 return 0;
311 }
312#endif
313
314 Desktop *d = new Desktop(); 302 Desktop *d = new Desktop();
315 303
316 QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) ); 304 QObject::connect( &a, SIGNAL(datebook()), d, SLOT(raiseDatebook()) );
317 QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) ); 305 QObject::connect( &a, SIGNAL(contacts()), d, SLOT(raiseContacts()) );
318 QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) ); 306 QObject::connect( &a, SIGNAL(launch()), d, SLOT(raiseLauncher()) );
319 QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) ); 307 QObject::connect( &a, SIGNAL(email()), d, SLOT(raiseEmail()) );
320 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) ); 308 QObject::connect( &a, SIGNAL(power()), d, SLOT(togglePower()) );
321 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) ); 309 QObject::connect( &a, SIGNAL(backlight()), d, SLOT(toggleLight()) );
322 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) ); 310 QObject::connect( &a, SIGNAL(symbol()), d, SLOT(toggleSymbolInput()) );
323 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) ); 311 QObject::connect( &a, SIGNAL(numLockStateToggle()), d, SLOT(toggleNumLockState()) );
324 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) ); 312 QObject::connect( &a, SIGNAL(capsLockStateToggle()), d, SLOT(toggleCapsLockState()) );
325 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) ); 313 QObject::connect( &a, SIGNAL(prepareForRestart()), d, SLOT(terminateServers()) );
326 314
327 (void)new SysFileMonitor(d); 315 (void)new SysFileMonitor(d);
328 Network::createServer(d); 316 Network::createServer(d);
329 317
330#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 318#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
331 if ( !QFile::exists( "/etc/pointercal" ) ) { 319 if ( !QFile::exists( "/etc/pointercal" ) ) {
332 // Make sure calibration widget starts on top. 320 // Make sure calibration widget starts on top.
333 Calibrate *cal = new Calibrate; 321 Calibrate *cal = new Calibrate;
334 cal->exec(); 322 cal->exec();
335 delete cal; 323 delete cal;
336 } 324 }
337#endif 325#endif
338 326
339 d->show(); 327 d->show();
340 328
341 int rv = a.exec(); 329 int rv = a.exec();
342 330
343 delete d; 331 delete d;
344 332
345 return rv; 333 return rv;
346} 334}
347 335
348int main( int argc, char ** argv ) 336int main( int argc, char ** argv )
349{ 337{
350#ifndef SINGLE_APP 338#ifndef SINGLE_APP
351 signal( SIGCHLD, SIG_IGN ); 339 signal( SIGCHLD, SIG_IGN );
352#endif 340#endif
353 341
354 int retVal = initApplication( argc, argv ); 342 int retVal = initApplication( argc, argv );
355 343
356#ifndef SINGLE_APP 344#ifndef SINGLE_APP
357 // Kill them. Kill them all. 345 // Kill them. Kill them all.
358 setpgid( getpid(), getppid() ); 346 setpgid( getpid(), getppid() );
359 killpg( getpid(), SIGTERM ); 347 killpg( getpid(), SIGTERM );
360 sleep( 1 ); 348 sleep( 1 );
361 killpg( getpid(), SIGKILL ); 349 killpg( getpid(), SIGKILL );
diff --git a/core/opie-login/opie-login.control b/core/opie-login/opie-login.control
new file mode 100644
index 0000000..d87fc6c
--- a/dev/null
+++ b/core/opie-login/opie-login.control
@@ -0,0 +1,9 @@
1Files: bin/opie-login
2Priority: optional
3Section: opie/system
4Maintainer: Project Opie <opie@handhelds.org>
5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION), libopie
8Description: Multiuser login for OPIE
9 A xdm/kdm equivalent for OPIE.
diff --git a/root/etc/init.d/opie b/root/etc/init.d/opie
index b5a185e..eed69c2 100755
--- a/root/etc/init.d/opie
+++ b/root/etc/init.d/opie
@@ -1,58 +1,63 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3 3
4module_id() { 4module_id() {
5 cat /proc/hal/model 5 cat /proc/hal/model
6} 6}
7 7
8export LOGNAME=root 8export LOGNAME=root
9export HOME=/$LOGNAME 9export HOME=/$LOGNAME
10#export QWS_DISPLAY=Transformed:Rot270:0 10#export QWS_DISPLAY=Transformed:Rot270:0
11export QTDIR=/opt/QtPalmtop 11export QTDIR=/opt/QtPalmtop
12export OPIEDIR=/opt/QtPalmtop 12export OPIEDIR=/opt/QtPalmtop
13export QPEDIR=/opt/QtPalmtop 13export QPEDIR=/opt/QtPalmtop
14export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPIEDIR/lib 14export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPIEDIR/lib
15export PATH=$PATH:$OPIEDIR/bin 15export PATH=$PATH:$OPIEDIR/bin
16 16
17#this sets the iPaqs powerbutton to mapable 17#this sets the iPaqs powerbutton to mapable
18echo 1 > /proc/sys/ts/suspend_button_mode 18echo 1 > /proc/sys/ts/suspend_button_mode
19 19
20if [ ! -x $OPIEDIR/bin/qpe ] ; then exit 0 ; fi 20if [ ! -x $OPIEDIR/bin/qpe ] ; then exit 0 ; fi
21 21
22$OPIEDIR/bin/opie-reorgfiles 22$OPIEDIR/bin/opie-reorgfiles
23 23
24. /etc/profile 24. /etc/profile
25 25
26killproc() { 26killproc() {
27 pid=`/bin/ps -e | /bin/sed -n -e '/\<'$1'\>/ s/^ *\([0-9][0-9]*\).*/\1/p'` 27 pid=`/bin/ps -e | /bin/sed -n -e '/\<'$1'\>/ s/^ *\([0-9][0-9]*\).*/\1/p'`
28 [ "$pid" != "" ] && kill $pid 28 [ "$pid" != "" ] && kill $pid
29} 29}
30 30
31case $1 in 31case $1 in
32'start') 32'start')
33 echo "Starting Opie..." 33 echo "Starting Opie..."
34 34
35 cd $HOME 35 cd $HOME
36 36
37 rm -f /etc/rc2.d/S99x # Can't have both running! 37 rm -f /etc/rc2.d/S99x # Can't have both running!
38 38
39 case `module_id` in 39 case `module_id` in
40 "3100" ) export QWS_DISPLAY=Transformed:Rot90:0 ;; 40 "3100" ) export QWS_DISPLAY=Transformed:Rot90:0 ;;
41 "3600" ) export QWS_DISPLAY=Transformed:Rot270:0 ;; 41 "3600" ) export QWS_DISPLAY=Transformed:Rot270:0 ;;
42 "3700" ) export QWS_DISPLAY=Transformed:Rot270:0 ;; 42 "3700" ) export QWS_DISPLAY=Transformed:Rot270:0 ;;
43 "3800" ) export QWS_DISPLAY=Transformed:Rot90:0 ;; 43 "3800" ) export QWS_DISPLAY=Transformed:Rot90:0 ;;
44 *) echo "Unknown processor type -`module_id`-!" ;; 44 *) echo "Unknown processor type -`module_id`-!" ;;
45 esac 45 esac
46 46
47 $OPIEDIR/bin/qpe 2>/dev/null >/dev/null & 47 if [ -x $OPIEDIR/bin/opie-login ]; then
48 $OPIEDIR/bin/opie-login 2>/dev/null >/dev/null &
49 else
50 $OPIEDIR/bin/qpe 2>/dev/null >/dev/null &
51 fi
48 52
49 ;; 53 ;;
50'stop') 54'stop')
51 echo "Killing Opie..." 55 echo "Killing Opie..."
52 killproc qpe 56 killproc qpe
57 killproc opie-login
53 ;; 58 ;;
54*) 59*)
55 echo "usage: $0 { start | stop }" 60 echo "usage: $0 { start | stop }"
56 ;; 61 ;;
57esac 62esac
58 63