]> git.pld-linux.org Git - projects/rc-scripts.git/blob - run-parts
- cleanups in sysinit + fix for shutting down bridge
[projects/rc-scripts.git] / run-parts
1 #!/bin/sh
2 # run-parts - concept taken from Debian
3 # $Id: run-parts,v 1.1.2.1 2000/10/18 20:10:45 misiek Exp $
4 #
5 # modified for PLD by Pawel Wilk <siefca@pld.org.pl>
6 # be ware: run-parts is now able to get arguments!
7 #          first argument is always set to the name of 
8 #          invoked directory
9
10 # keep going when something fails
11 set +e
12
13 if [ $# -lt 1 ]; then
14         echo "Usage: run-parts <dir> <args...>"
15         exit 1
16 fi
17
18 if [ ! -d $1 ]; then
19         echo "Not a directory: $1"
20         exit 1
21 fi
22
23 for i in $1/* ; do
24         [ -d $i ] && continue
25         if [ -x $i ]; then
26                 $i $*
27         fi
28 done
29
30 exit 0
This page took 0.229683 seconds and 3 git commands to generate.