From: Grazvydas Ignotas Date: Sun, 19 Oct 2014 02:01:00 +0000 (+0300) Subject: pandora-skel: .xinitrc cleanups X-Git-Tag: sz_172rc~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3531951a427cb6c0aa2dc6224949a895ac1fa5a;p=openpandora.oe.git pandora-skel: .xinitrc cleanups --- diff --git a/recipes/pandora-system/pandora-skel.bb b/recipes/pandora-system/pandora-skel.bb index 7135719..710750c 100644 --- a/recipes/pandora-system/pandora-skel.bb +++ b/recipes/pandora-system/pandora-skel.bb @@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" # /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;) RDEPENDS = "shadow" -PR = "r29" +PR = "r30" SRC_URI = " \ file://.xinitrc \ diff --git a/recipes/pandora-system/pandora-skel/.xinitrc b/recipes/pandora-system/pandora-skel/.xinitrc index 282f1c0..fd4bb3f 100644 --- a/recipes/pandora-system/pandora-skel/.xinitrc +++ b/recipes/pandora-system/pandora-skel/.xinitrc @@ -44,11 +44,12 @@ xmodmap ~/.pndXmodmap #Write the current user into /tmp/currentuser for any scripts or programs who want to make use of it whoami > /tmp/currentuser id -u > /tmp/currentuid -chmod 777 /tmp/currentuser -chmod 777 /tmp/currentuid +chmod +r /tmp/currentuser +chmod +r /tmp/currentuid # HUP pndnotifyd to make sure it picks up the users home. -killall -1 pndnotifyd & +# -- nope, we are not root and can't do it +# killall -1 pndnotifyd & # The following variable defines the session which is started if the user # doesn't explicitely select a session in SLiM. @@ -66,9 +67,7 @@ echo $DEFAULT_SESSION > /tmp/gui.load SESSION=$1 -if [ "$SESSION" == "" ] - - then +if [ "$SESSION" == "" ]; then SESSION=$(cat /tmp/gui.load) fi @@ -85,12 +84,12 @@ chmod +x /tmp/gui.stop # This way, we can easily do a quick switch from any session to the next one by simply # echo'ing the new session executable into /tmp/gui.load and exiting. -nocleanwarn=$(cat /tmp/nocleanwarn) +nocleanwarn=$(cat /tmp/nocleanwarn 2> /dev/null) -if [ $nocleanwarn = "Yes" ]; then +if [ "$nocleanwarn" = "Yes" ]; then pnd_version=$(cat /tmp/pnd_version) - if [ "$pnd_version" == "OMAP3630" ]; then + if [ "$pnd_version" = "OMAP3630" ]; then safespeed="1000" else safespeed="600" @@ -110,14 +109,13 @@ do rm /tmp/gui.load if [ "$SESSION" == "" ] - then - exit 0; + exit 1 fi $SESSION - SESSION=$(cat /tmp/gui.load) + SESSION=$(cat /tmp/gui.load 2> /dev/null) STOP_SESSION=$(grep $SESSION /etc/pandora/conf/gui.conf | awk -F\; '{print $4}') echo $STOP_SESSION > /tmp/gui.stop chmod +x /tmp/gui.stop