next up previous contents
Next: 8.3.1 The disection Up: 8. Other Administrative Tasks Previous: 8.2.2 Creating your personnel   Contents

8.3 run-parts explained.

Where is it?
 
Here's how to find the script on your system,

# which run-parts

/usr/bin/run-parts
And here's what it looks like before it's all discected in the piece by Jim Sack below. This is a good example of a shell script. Though the topic of shell scripts is beyond the purposes of this book, it does help illuminate how crontab is set up on a Red Hat Linux system, and give you a quick view of a shell script. If you are running a Red Hat system, you can view the file on your own system.

# cat /usr/bin/run-parts

#!/bin/bash

# run-parts - concept taken from Debian

# keep going when something fails

set +e

if [ $# -lt 1 ]; then

echo "Usage: run-parts <dir>"

exit 1

fi

if [ ! -d $1 ]; then

echo "Not a directory: $1"

exit 1

fi

for i in $1/* ; do

[ -d $i ] && continue

if [ -x $i ]; then

$i

fi

done

exit 0



Subsections
next up previous contents
Next: 8.3.1 The disection Up: 8. Other Administrative Tasks Previous: 8.2.2 Creating your personnel   Contents