vpsreboot: fix lockfile race condition
vpsreboot script is running out of cron (invoked in /etc/crond./vz)
every 5 minutes
since /etc/init.d/vz would cat anything in /etc/vz/cron/* into
/etc/cron.d/vz, eventually (for example, due to .rpmnew files appearing
in /etc/vz/cron) there would be multiple invocations of vpsreboot
in /etc/cron.d/vz; this would cause two (or more) instances
of vpsreboot to run simultaneously, causing occasional errors as
described (and kludged) in commit 037fb135f9e9e73c065f4068aeb7f55121a9b7f9
While commit a9f2901d8d5a3bf0170762ced46b23426f94b528 already takes care
of ignoring .rpmnew files in /etc/init.d/vz, having a race condition
in vpsreboot is still bad; here is a fix.
1 file changed