Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 261000
Collapse All | Expand All

(-)/usr/sbin/run-crons (-5 / +16 lines)
Lines 31-36 Link Here
31
31
32
mkdir -p ${LOCKDIR}
32
mkdir -p ${LOCKDIR}
33
33
34
run_recursive() {
35
	CRONDIR="$1"
36
#	echo "Executing cron scripts in directory: $CRONDIR"
37
	for SCRIPT in $CRONDIR/* ; do
38
		if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then
39
#			echo "Executing cron script: $SCRIPT"
40
			$SCRIPT
41
		fi
42
43
		if [[ -d $SCRIPT ]]; then
44
			run_recursive $SCRIPT
45
		fi
46
	done
47
}
48
34
# Make sure we're not running multiple instances at once.
49
# Make sure we're not running multiple instances at once.
35
# Try twice to lock, otherwise give up.
50
# Try twice to lock, otherwise give up.
36
for ((i = 0; i < 2; i = i + 1)); do
51
for ((i = 0; i < 2; i = i + 1)); do
Lines 91-101 Link Here
91
		touch ${LOCKDIR}/cron.$BASE
106
		touch ${LOCKDIR}/cron.$BASE
92
107
93
		set +e
108
		set +e
94
		for SCRIPT in $CRONDIR/* ; do
109
		run_recursive $CRONDIR
95
			if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then
96
				$SCRIPT
97
			fi
98
		done
99
	fi
110
	fi
100
done
111
done
101
112

Return to bug 261000