[Fai-commit] r5558 - in trunk: debian lib
Thomas Lange
lange at alioth.debian.org
Sun Oct 18 10:37:22 UTC 2009
Author: lange
Date: 2009-10-18 10:37:22 +0000 (Sun, 18 Oct 2009)
New Revision: 5558
Modified:
trunk/debian/changelog
trunk/lib/subroutines
Log:
set trap for softupdate after checking if second instance is running
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-10-18 08:50:16 UTC (rev 5557)
+++ trunk/debian/changelog 2009-10-18 10:37:22 UTC (rev 5558)
@@ -14,6 +14,7 @@
additional call to clean_exit in task_dirinstall
include subroutines-linux into subroutines (closes: #494377)
if two softupdates are running, print the name of the lock file
+ set trap for softupdate after checking if second instance is running
* fai-class: add string warning to message
* task_sysinfo: call blkid on all disks
* fcopy: add die() after open command
Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines 2009-10-18 08:50:16 UTC (rev 5557)
+++ trunk/lib/subroutines 2009-10-18 10:37:22 UTC (rev 5558)
@@ -556,10 +556,10 @@
task_softupdate() {
stamp=/var/run/fai/fai_softupdate_is_running
+ [ -f "$stamp" ] && die "Lock file $stamp found. Another fai softupdate is already running. Aborting."
+ echo $$ > $stamp
trap "rm -f $stamp" INT QUIT EXIT
- [ -f "$stamp" ] && die "Lock file $stamp found. Another fai softupdate is already running. Aborting."
- echo $$ > $stamp
# if the system had been installed using fai < 3.0 disk_var.sh is found in /etc/fai
if [ ! -f /var/lib/fai/disk_var.sh -a -f /etc/fai/disk_var.sh ] ; then
mv /etc/fai/disk_var.sh /var/lib/fai/
More information about the Fai-commit
mailing list