Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 530416 | Differences between
and this patch

Collapse All | Expand All

(-)run-crons.stock (-2 / +4 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#!/bin/sh
2
#
2
#
3
# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.3,v 1.1 2009/04/14 06:13:36 bangert Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.3,v 1.1 2009/04/14 06:13:36 bangert Exp $
4
#
4
#
Lines 37-43 Link Here
37
37
38
# Make sure we're not running multiple instances at once.
38
# Make sure we're not running multiple instances at once.
39
# Try twice to lock, otherwise give up.
39
# Try twice to lock, otherwise give up.
40
for ((i = 0; i < 2; i = i + 1)); do
40
i=0
41
while [ "$i" -lt 2 ]; do
41
	ln -sn $$ ${LOCKFILE} 2>/dev/null && break
42
	ln -sn $$ ${LOCKFILE} 2>/dev/null && break
42
43
43
	# lock failed, check for a running process.
44
	# lock failed, check for a running process.
Lines 54-59 Link Here
54
	else
55
	else
55
		rm -f ${LOCKFILE}
56
		rm -f ${LOCKFILE}
56
	fi
57
	fi
58
	i=$(($i+1))
57
done
59
done
58
60
59
# Check to make sure locking was successful
61
# Check to make sure locking was successful

Return to bug 530416