[maemo-commits] [maemo-commits] r16371 - in projects/haf/trunk/hildon-initscripts: . debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Oct 8 12:16:46 EEST 2008
- Previous message: [maemo-commits] r16369 - in projects/haf/branches/hildon-thumbnail/daemonize: . daemon debian
- Next message: [maemo-commits] r16372 - projects/haf/trunk/hildon-initscripts/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: schulhof
Date: 2008-10-08 12:16:46 +0300 (Wed, 08 Oct 2008)
New Revision: 16371
Modified:
projects/haf/trunk/hildon-initscripts/af-sb-init.sh.in
projects/haf/trunk/hildon-initscripts/debian/changelog
Log:
* Properly launch gconf, hildon-desktop, and HIM
* Fixes: NB#88885, NB#89613
Modified: projects/haf/trunk/hildon-initscripts/af-sb-init.sh.in
===================================================================
--- projects/haf/trunk/hildon-initscripts/af-sb-init.sh.in 2008-10-07 12:35:13 UTC (rev 16370)
+++ projects/haf/trunk/hildon-initscripts/af-sb-init.sh.in 2008-10-08 09:16:46 UTC (rev 16371)
@@ -21,9 +21,33 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
+DIR=@sysconfdir@/osso-af-init
+
+af_sb_service() # $1 name, $2 start|stop
+{
+ AF_SB_SERVICE_NAME=$1
+ AF_SB_SERVICE_ACTION=$2
+
+ if [ -e $DIR/$AF_SB_SERVICE_NAME.defs ]; then
+ source $DIR/$AF_SB_SERVICE_NAME.defs
+ fi
+ if [ -e $DIR/$AF_SB_SERVICE_NAME.sh ]; then
+ source $DIR/$AF_SB_SERVICE_NAME.sh $AF_SB_SERVICE_ACTION
+ fi
+}
+
+af_sb_init_service() # $1 name, $2 start|stop
+{
+ AF_SB_INIT_SERVICE_NAME=$1
+ AF_SB_INIT_SERVICE_ACTION=$2
+
+ if test -x /etc/init.d/$AF_SB_INIT_SERVICE_NAME; then
+ /etc/init.d/$AF_SB_INIT_SERVICE_NAME $AF_SB_INIT_SERVICE_ACTION
+ fi
+}
+
STOP=FALSE
START=FALSE
-DIR=@sysconfdir@/osso-af-init
GDB=
if [ $# = 0 ]; then
@@ -78,7 +102,7 @@
mkdir $AF_PIDDIR
fi
-# dbus want's this, so let's make sure it is found.
+# dbus wants this, so let's make sure it is found.
mkdir -p /var/run/dbus
# overriding some variables
@@ -124,35 +148,21 @@
TMPSTOP=$STOP
if [ "$STOP" = "TRUE" ]; then
- for svc in \
- hildon-desktop \
- keyboard \
- clipboard \
- matchbox \
- sapwood-server \
- dbus-sessionbus \
- dbus-systembus;
- do
- if [ -e $DIR/$svc.defs ]; then
- source $DIR/$svc.defs
- fi
- if [ -e $DIR/$svc.sh ]; then
- source $DIR/$svc.sh stop
- fi
- done
+ af_sb_service keyboard stop
+ af_sb_init_service hildon-desktop stop
+ af_sb_service sapwood-server stop
+ af_sb_service dbus-sessionbus stop
+ af_sb_service dbus-systembus stop
# stop maemo-launcher
- if [ -x /etc/init.d/maemo-launcher ]; then
- /etc/init.d/maemo-launcher stop
- fi
+ af_sb_init_service maemo-launcher stop
+
# stop at-spi
- if [ -x /etc/init.d/at-spi ]; then
- /etc/init.d/at-spi stop
- fi
+ af_sb_init_service at-spi stop
+
# just in case something goes to the script in the future
- if [ -x /etc/init.d/lessertunjo0 ]; then
- /etc/init.d/lessertunjo0 stop
- fi
+ af_sb_init_service lessertunjo0 stop
+
# remove dbus own dbus pid file
rm -rf /var/run/dbus/pid
fi
@@ -200,52 +210,30 @@
rm -rf /var/run/dbus/pid
# start dbus system and session busses
- for svc in \
- dbus-systembus \
- dbus-sessionbus;
- do
- if [ -e $DIR/$svc.defs ]; then
- source $DIR/$svc.defs
- fi
- if [ -e $DIR/$svc.sh ]; then
- source $DIR/$svc.sh start
- fi
- done
+ af_sb_service dbus-systembus start
+ af_sb_service dbus-sessionbus start
# resource AF_DEFS to read the address of the dbus session address
source $AF_DEFS
# make some directories for games
- if [ -x /etc/init.d/lessertunjo0 ]; then
- /etc/init.d/lessertunjo0 start
- fi
+ af_sb_init_service lessertunjo0 start
# start maemo-launcher
- if [ -x /etc/init.d/maemo-launcher ]; then
- /etc/init.d/maemo-launcher start
- fi
+ af_sb_init_service maemo-launcher start
# start at-spi
- if [ -x /etc/init.d/at-spi ]; then
- /etc/init.d/at-spi start
- fi
+ af_sb_init_service at-spi start
- export TMPDIR=/tmp
+ # start GConf
+ /usr/lib/gconf2/gconfd-2 &
- # start other things
- for svc in \
- sapwood-server \
- matchbox \
- clipboard \
- keyboard \
- hildon-desktop;
- do
- if [ -e $DIR/$svc.defs ]; then
- source $DIR/$svc.defs
- fi
- if [ -e $DIR/$svc.sh ]; then
- source $DIR/$svc.sh start
- fi
- done
+ # start sapwood
+ af_sb_service sapwood-server start
+ # start hildon-desktop
+ af_sb_init_service hildon-desktop start
+
+ # start HIM
+ af_sb_service keyboard start
fi
Modified: projects/haf/trunk/hildon-initscripts/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-initscripts/debian/changelog 2008-10-07 12:35:13 UTC (rev 16370)
+++ projects/haf/trunk/hildon-initscripts/debian/changelog 2008-10-08 09:16:46 UTC (rev 16371)
@@ -1,6 +1,7 @@
hildon-initscripts (1.18-1unreleased0) unstable; urgency=low
- * Added export TMPDIR=/tmp to af-sb-init.sh
+ * Properly launch gconf, hildon-desktop, and HIM
+ * Fixes: NB#88885, NB#89613
-- Gabriel Schulhof <gabriel.schulhof at nokia.com> Wed, 01 Oct 2008 16:35:08 +0300
- Previous message: [maemo-commits] r16369 - in projects/haf/branches/hildon-thumbnail/daemonize: . daemon debian
- Next message: [maemo-commits] r16372 - projects/haf/trunk/hildon-initscripts/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
