login-manager: Fix a pathing bug which b0rks login-manager if only one LM is installed.
authorMatthias Hentges <oe@hentges.net>
Fri, 10 Feb 2006 04:27:00 +0000 (04:27 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 10 Feb 2006 04:27:00 +0000 (04:27 +0000)
packages/login-manager/files/login-manager
packages/login-manager/login-manager.bb

index 6fbc307..7b62dfa 100644 (file)
@@ -4,12 +4,25 @@
 # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
 #
 # Date: 09-FEB-06
-
+#
+# This script checks if a keyboard is present and then runs a propper LM.
+# On devices w/o keyboard, a LM from the NO_KBD_LMS variable is selected.
+#
+# If more than one usable login-manager is found, the first one is used.
+#
+# Users can force their favorite login-manager to be selected via symlinking
+# a LM from /etc/X11/login-managers to /etc/X11/login-managers/default.
+#
 
 LM_PATH="/etc/X11/login-managers"
 
+# A list of login-manager which display an OSD keyboard
 NO_KBD_LMS="gpe-dm"
 
+#
+# * * * No user-variables behind this point * * *
+#
+
 run_wm() {
        if test -z "$1"
        then
@@ -19,6 +32,7 @@ run_wm() {
        
        echo "$1" > /tmp/_running_lm
        echo -e "\t* Starting `basename "$1"`\n--\n"
+       
        "$1" start
        
        exit 0
@@ -54,7 +68,8 @@ get_valid_lms() {
                then
                        SELECTED_LM="$LM_PATH/`echo "$VALID_LMS" | awk '{print $1}'`"                           
                else
-                       SELECTED_LM="$VALID_LMS"                                
+                       # Use awk here, too to filter a backspace in VALID_LMS
+                       SELECTED_LM="$LM_PATH/`echo "$VALID_LMS" | awk '{print $1}'`"                           
                fi
        fi      
 }
index 04f8b34..44d8814 100644 (file)
@@ -5,7 +5,7 @@ DESCRIPTION = "Initscript for login-managers"
 SECTION = "base"
 PRIORITY = "optional"
 MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>"
-PR = "r0"
+PR = "r1"
 
 INITSCRIPT_NAME = "login-manager"
 INITSCRIPT_PARAMS = "start 99 5 . stop 20 0 1 6 ."