[Fai-commit] r4709 - trunk/lib
lange at alioth.debian.org
lange at alioth.debian.org
Sun Nov 11 10:41:53 UTC 2007
Author: lange
Date: 2007-11-11 10:41:53 +0000 (Sun, 11 Nov 2007)
New Revision: 4709
Modified:
trunk/lib/subroutines
Log:
write pid to stamp file, print PID in case of error
Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines 2007-11-11 10:36:18 UTC (rev 4708)
+++ trunk/lib/subroutines 2007-11-11 10:41:53 UTC (rev 4709)
@@ -455,7 +455,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
task_install() {
- > $stamp
+ echo $$ > $stamp
save_dmesg
@@ -478,7 +478,8 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
- echo "$stamp was not removed."
+ echo -n "$stamp was not removed. PID of running process: "
+ cat $stamp
sendmon "TASKERROR install 21"
die "Please look at the log files in $LOGDIR for errors."
fi
@@ -486,7 +487,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
task_dirinstall() {
- > $stamp
+ echo $$ > $stamp
mkdir -p $FAI_ROOT
FAI_ROOT=$(cd $FAI_ROOT;pwd)
@@ -507,7 +508,8 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
- echo "$stamp was not removed."
+ echo -n "$stamp was not removed. PID of running process: "
+ cat $stamp
sendmon "TASKERROR install 21"
die "Please look at the log files in $LOGDIR for errors."
fi
@@ -518,7 +520,7 @@
local stamp=/var/run/fai/fai_softupdate_is_running
[ -f "$stamp" ] && die "Another fai softupdate is already running. Aborting."
- > $stamp
+ 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/
@@ -546,7 +548,8 @@
if [ -f $stamp ]; then
echo "Error while executing commands in subshell."
- echo "$stamp was not removed."
+ echo -n "$stamp was not removed. PID of running process: "
+ cat $stamp
sendmon "TASKERROR softupdate 21"
die "Please look at the log files in $LOGDIR for errors."
fi
More information about the Fai-commit
mailing list