]> git.pld-linux.org Git - projects/rc-scripts.git/blame - run-parts
- cleanups in sysinit + fix for shutting down bridge
[projects/rc-scripts.git] / run-parts
CommitLineData
8dbd5412 1#!/bin/sh
8dbd5412 2# run-parts - concept taken from Debian
a04d924e 3# $Id: run-parts,v 1.1.2.1 2000/10/18 20:10:45 misiek Exp $
8dbd5412 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
11set +e
12
13if [ $# -lt 1 ]; then
14 echo "Usage: run-parts <dir> <args...>"
15 exit 1
16fi
17
18if [ ! -d $1 ]; then
19 echo "Not a directory: $1"
20 exit 1
21fi
22
23for i in $1/* ; do
24 [ -d $i ] && continue
25 if [ -x $i ]; then
26 $i $*
27 fi
28done
29
30exit 0
This page took 0.135883 seconds and 4 git commands to generate.