]> git.pld-linux.org Git - projects/rc-scripts.git/blame - run-parts
- scripts now ready to exec run-parts for each of interfaces going up/down,
[projects/rc-scripts.git] / run-parts
CommitLineData
8dbd5412 1#!/bin/sh
2
3# run-parts - concept taken from Debian
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.054679 seconds and 4 git commands to generate.