# # Based upon alternative run-parts implementation, by Branden Robinson e.a. # as used in /etc/X11/Xsession from the xfree86-common Debian package # up to version 4.3.0.dfsg.1-11. # # See http://packages.debian.org/debianutils for the "real" run-parts. if [ -z "$1" ]; then echo >&2 "run_parts() called without an argument." exit 1 fi if [ ! -d "$1" ]; then echo >&2 "run_parts() called, but \"$1\" does not exist or is" \ "not a directory." exit 1 fi for F in $(ls $1); do if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then if [ -f "$1/$F" ]; then "$1/$F" fi fi done