[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#457606: /etc/X11/Xsession: use run-parts --list instead of run_parts function



Package: x11-common
Version: 1:7.3+8
Severity: wishlist
File: /etc/X11/Xsession
Tags: patch

it seems like "run-parts --list" would be equivalent to the run_parts
function in /etc/X11/Xsession. patch attached.

--- /etc/X11/Xsession	2007-02-20 01:07:09.000000000 -0800
+++ Xsession	2007-12-23 11:39:48.000000000 -0800
@@ -47,24 +47,6 @@
            "<debian-x@lists.debian.org>."
 }
 
-run_parts () {
-  # until run-parts --noexec is implemented
-  if [ -z "$1" ]; then
-    internal_errormsg "run_parts() called without an argument."
-  fi
-  if [ ! -d "$1" ]; then
-    internal_errormsg "run_parts() called, but \"$1\" does not exist or is" \
-                      "not a directory."
-  fi
-  for F in $(/bin/ls $1); do
-    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
-      if [ -f "$1/$F" ]; then
-        echo "$1/$F"
-      fi
-    fi
-  done
-}
-
 # initialize variables for use by all session scripts
 
 OPTIONFILE=/etc/X11/Xsession.options
@@ -116,7 +98,7 @@
 # instead of executing so that the variables and functions defined above
 # are available to the scripts, and so that they can pass variables to each
 # other
-SESSIONFILES=$(run_parts $SYSSESSIONDIR)
+SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
 if [ -n "$SESSIONFILES" ]; then
   set +e
   for SESSIONFILE in $SESSIONFILES; do



Reply to: