[maemo-commits] [maemo-commits] r15739 - projects/haf/trunk/maemo-launcher/debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jul 3 18:47:30 EEST 2008
Author: guillem
Date: 2008-07-03 18:47:28 +0300 (Thu, 03 Jul 2008)
New Revision: 15739

Modified:
   projects/haf/trunk/maemo-launcher/debian/changelog
   projects/haf/trunk/maemo-launcher/debian/init.d
Log:
Export USER, LOGNAME, SHELL and HOME to maemo-launcher

(Fixes: MM#1131)

Modified: projects/haf/trunk/maemo-launcher/debian/changelog
===================================================================
--- projects/haf/trunk/maemo-launcher/debian/changelog	2008-07-03 15:47:22 UTC (rev 15738)
+++ projects/haf/trunk/maemo-launcher/debian/changelog	2008-07-03 15:47:28 UTC (rev 15739)
@@ -1,3 +1,9 @@
+maemo-launcher (0.30-2) UNRELEASED; urgency=low
+
+  * Export USER, LOGNAME, SHELL and HOME to maemo-launcher. (Fixes: MM#1131)
+
+ -- Guillem Jover <guillem.jover at nokia.com>  Fri, 06 Jun 2008 20:23:48 +0300
+
 maemo-launcher (0.30-1) unstable; urgency=low
 
   * New Upstream Release.

Modified: projects/haf/trunk/maemo-launcher/debian/init.d
===================================================================
--- projects/haf/trunk/maemo-launcher/debian/init.d	2008-07-03 15:47:22 UTC (rev 15738)
+++ projects/haf/trunk/maemo-launcher/debian/init.d	2008-07-03 15:47:28 UTC (rev 15739)
@@ -17,8 +17,11 @@
   DAEMON_OPTS="$DAEMON_BASE_OPTS"
 else
   PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-  USER=user
-  HOME=/home/$USER
+  export USER=user
+  export LOGNAME=$USER
+  PWENTRY=`getent passwd $USER`
+  export HOME=`echo $PWENTRY | cut -d: -f6`
+  export SHELL=`echo $PWENTRY | cut -d: -f7`
   if [ `id -u` = 0 ]; then
     CHUID="--chuid $USER"
     # Make sure the launcher is not an OOM candidate


More information about the maemo-commits mailing list