/usr/bin/drbl-run-parts is in drbl 2.20.11-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/bin/bash
# drbl-run-parts - modified from Fedora 17's run-parts in crontabs package. License is GPLv2.
# The reason we do not use run-parts from Debian is people are always confused:
# http://drbl.org/faq/fine-print.php?path=./2_System/31_prerun_postrun_not_working.faq#31_prerun_postrun_not_working.faq
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts [--list | --test] <dir>"
exit 1
fi
while [ $# -gt 1 ]; do
case $1 in
--list)
list=1
shift
break
;;
--test)
test=1
shift
break
;;
--)
# -- end of options
shift
break
;;
*)
# directory
break
;;
esac
done
if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit 1
fi
# Ignore *~ and *, scripts
for i in $(LC_ALL=C; echo ${1%/}/*[^~,]) ; do
[ -d $i ] && continue
if [ -e $i ]; then
if [ -x $i ]; then
# run executable files
$i
fi
fi
done
exit 0
|