slackware-current/source/a/dcron/run-parts
Patrick J Volkerding 589ec060e7 Sat Jan 13 20:31:09 UTC 2024
a/dcron-4.5-x86_64-15.txz:  Rebuilt.
  run-parts: don't redirect stderr to stdout. Thanks to Thom1b.
ap/vim-9.1.0027-x86_64-1.txz:  Upgraded.
d/mercurial-6.6.2-x86_64-1.txz:  Upgraded.
d/rust-bindgen-0.69.2-x86_64-1.txz:  Upgraded.
kde/attica-5.114.0-x86_64-1.txz:  Upgraded.
kde/baloo-5.114.0-x86_64-1.txz:  Upgraded.
kde/bluez-qt-5.114.0-x86_64-1.txz:  Upgraded.
kde/breeze-icons-5.114.0-noarch-1.txz:  Upgraded.
kde/extra-cmake-modules-5.114.0-x86_64-1.txz:  Upgraded.
kde/frameworkintegration-5.114.0-x86_64-1.txz:  Upgraded.
kde/kactivities-5.114.0-x86_64-1.txz:  Upgraded.
kde/kactivities-stats-5.114.0-x86_64-1.txz:  Upgraded.
kde/kapidox-5.114.0-x86_64-1.txz:  Upgraded.
kde/karchive-5.114.0-x86_64-1.txz:  Upgraded.
kde/kauth-5.114.0-x86_64-1.txz:  Upgraded.
kde/kbookmarks-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcalendarcore-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcmutils-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcodecs-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcompletion-5.114.0-x86_64-1.txz:  Upgraded.
kde/kconfig-5.114.0-x86_64-1.txz:  Upgraded.
kde/kconfigwidgets-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcontacts-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcoreaddons-5.114.0-x86_64-1.txz:  Upgraded.
kde/kcrash-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdav-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdbusaddons-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdeclarative-5.114.0-x86_64-1.txz:  Upgraded.
kde/kded-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdelibs4support-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdesignerplugin-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdesu-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdewebkit-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdnssd-5.114.0-x86_64-1.txz:  Upgraded.
kde/kdoctools-5.114.0-x86_64-1.txz:  Upgraded.
kde/kemoticons-5.114.0-x86_64-1.txz:  Upgraded.
kde/kfilemetadata-5.114.0-x86_64-1.txz:  Upgraded.
kde/kglobalaccel-5.114.0-x86_64-1.txz:  Upgraded.
kde/kguiaddons-5.114.0-x86_64-1.txz:  Upgraded.
kde/kholidays-5.114.0-x86_64-1.txz:  Upgraded.
kde/khtml-5.114.0-x86_64-1.txz:  Upgraded.
kde/ki18n-5.114.0-x86_64-1.txz:  Upgraded.
kde/kiconthemes-5.114.0-x86_64-1.txz:  Upgraded.
kde/kidletime-5.114.0-x86_64-1.txz:  Upgraded.
kde/kimageformats-5.114.0-x86_64-1.txz:  Upgraded.
kde/kinit-5.114.0-x86_64-1.txz:  Upgraded.
kde/kio-5.114.0-x86_64-1.txz:  Upgraded.
kde/kirigami2-5.114.0-x86_64-1.txz:  Upgraded.
kde/kitemmodels-5.114.0-x86_64-1.txz:  Upgraded.
kde/kitemviews-5.114.0-x86_64-1.txz:  Upgraded.
kde/kjobwidgets-5.114.0-x86_64-1.txz:  Upgraded.
kde/kjs-5.114.0-x86_64-1.txz:  Upgraded.
kde/kjsembed-5.114.0-x86_64-1.txz:  Upgraded.
kde/kmediaplayer-5.114.0-x86_64-1.txz:  Upgraded.
kde/knewstuff-5.114.0-x86_64-1.txz:  Upgraded.
kde/knotifications-5.114.0-x86_64-1.txz:  Upgraded.
kde/knotifyconfig-5.114.0-x86_64-1.txz:  Upgraded.
kde/kpackage-5.114.0-x86_64-1.txz:  Upgraded.
kde/kparts-5.114.0-x86_64-1.txz:  Upgraded.
kde/kpeople-5.114.0-x86_64-1.txz:  Upgraded.
kde/kplotting-5.114.0-x86_64-1.txz:  Upgraded.
kde/kpty-5.114.0-x86_64-1.txz:  Upgraded.
kde/kquickcharts-5.114.0-x86_64-1.txz:  Upgraded.
kde/kross-5.114.0-x86_64-1.txz:  Upgraded.
kde/krunner-5.114.0-x86_64-1.txz:  Upgraded.
kde/kservice-5.114.0-x86_64-1.txz:  Upgraded.
kde/ktextaddons-1.5.3-x86_64-1.txz:  Upgraded.
kde/ktexteditor-5.114.0-x86_64-1.txz:  Upgraded.
kde/ktextwidgets-5.114.0-x86_64-1.txz:  Upgraded.
kde/kunitconversion-5.114.0-x86_64-1.txz:  Upgraded.
kde/kwallet-5.114.0-x86_64-1.txz:  Upgraded.
kde/kwayland-5.114.0-x86_64-1.txz:  Upgraded.
kde/kwidgetsaddons-5.114.0-x86_64-1.txz:  Upgraded.
kde/kwindowsystem-5.114.0-x86_64-1.txz:  Upgraded.
kde/kxmlgui-5.114.0-x86_64-1.txz:  Upgraded.
kde/kxmlrpcclient-5.114.0-x86_64-1.txz:  Upgraded.
kde/modemmanager-qt-5.114.0-x86_64-1.txz:  Upgraded.
kde/networkmanager-qt-5.114.0-x86_64-1.txz:  Upgraded.
kde/oxygen-icons-5.114.0-noarch-1.txz:  Upgraded.
kde/plasma-framework-5.114.0-x86_64-1.txz:  Upgraded.
kde/prison-5.114.0-x86_64-1.txz:  Upgraded.
kde/pulseaudio-qt-1.4.0-x86_64-1.txz:  Upgraded.
kde/purpose-5.114.0-x86_64-1.txz:  Upgraded.
kde/qqc2-desktop-style-5.114.0-x86_64-1.txz:  Upgraded.
kde/solid-5.114.0-x86_64-1.txz:  Upgraded.
kde/sonnet-5.114.0-x86_64-1.txz:  Upgraded.
kde/syndication-5.114.0-x86_64-1.txz:  Upgraded.
kde/syntax-highlighting-5.114.0-x86_64-1.txz:  Upgraded.
kde/threadweaver-5.114.0-x86_64-1.txz:  Upgraded.
l/jasper-4.1.2-x86_64-1.txz:  Upgraded.
l/pulseaudio-17.0-x86_64-1.txz:  Upgraded.
n/bluez-5.72-x86_64-1.txz:  Upgraded.
x/libdrm-2.4.120-x86_64-1.txz:  Upgraded.
xap/vim-gvim-9.1.0027-x86_64-1.txz:  Upgraded.
2024-01-13 22:39:44 +01:00

100 lines
2 KiB
Bash

#!/bin/bash
# run-parts - concept taken from Debian
# 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
if [ -f /etc/default/run-parts ]; then
. /etc/default/run-parts
fi
# Ignore *~ and *, scripts
for i in $(LC_ALL=C; echo ${1%/}/*[^~,]) ; do
[ -d $i ] && continue
# Don't run *.{bak,new,rpmsave,rpmorig,rpmnew,swp,cfsaved} scripts
[ "${i%.bak}" != "${i}" ] && continue
[ "${i%.new}" != "${i}" ] && continue
[ "${i%.rpmsave}" != "${i}" ] && continue
[ "${i%.rpmorig}" != "${i}" ] && continue
[ "${i%.rpmnew}" != "${i}" ] && continue
[ "${i%.swp}" != "${i}" ] && continue
[ "${i%.cfsaved}" != "${i}" ] && continue
[ "${i%,v}" != "${i}" ] && continue
# jobs.deny prevents specific files from being executed
# jobs.allow prohibits all non-named jobs from being run.
# can be used in conjunction but there's no reason to do so.
if [ -r $1/jobs.deny ]; then
grep -q "^$(basename $i)$" $1/jobs.deny && continue
fi
if [ -r $1/jobs.allow ]; then
grep -q "^$(basename $i)$" $1/jobs.allow || continue
fi
if [ -e $i ]; then
if [ -r $1/whitelist ]; then
grep -q "^$(basename $i)$" $1/whitelist && continue
fi
if [ ${list:-0} = 1 ]; then
echo $i;
elif [ -x $i ]; then
if [ ${test:-0} = 1 ]; then
echo $i;
continue
fi
if [ "$RANDOMIZE" != "" ]; then
let "rtime = $RANDOM"
if [ "$RANDOMTIME" != "" ]; then
let "rtime %= $RANDOMTIME"
else
let "rtime %= 300"
fi
sleep $rtime
fi
# run executable files
logger -p cron.notice -t "run-parts[$$]" "($1) starting $(basename $i)"
$i | sed '1i\
'"$i"':\
'
logger -p cron.notice -t "run-parts[$$]" "($1) finished $(basename $i)"
fi
fi
done
exit 0