1 --- subroutines.orig 2007-12-16 11:20:12.000000000 +0000
2 +++ subroutines 2007-12-16 11:23:01.000000000 +0000
4 echo Performing FAI system update. All data may be overwritten!
8 + echo Performing FAI chroot update. All data may be overwritten!
12 echo Showing system information.
16 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18 +task_chrootupdate() {
20 + local stamp=/var/run/fai/fai_chrootupdate_is_running
22 + [ -f "$stamp" ] && die "Another fai chrootupdate is already running. Aborting."
24 + # if the system had been installed using fai < 3.0 disk_var.sh is found in /etc/fai
25 + if [ ! -f /var/lib/fai/disk_var.sh -a -f /etc/fai/disk_var.sh ] ; then
26 + mv /etc/fai/disk_var.sh /var/lib/fai/
28 + # the following copy operation is required to make $LOGDIR a reliable source
30 + # use the last disk_var during update if available
31 + [ -f /var/lib/fai/disk_var.sh ] && cp -p /var/lib/fai/disk_var.sh $LOGDIR
33 + defnop wait_for_jobs
40 + echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] seconds."
43 + # save again, because new messages could be created
47 + if [ -f $stamp ]; then
48 + echo "Error while executing commands in subshell."
49 + echo -n "$stamp was not removed. PID of running process: "
51 + sendmon "TASKERROR chrootupdate 21"
52 + die "Please look at the log files in $LOGDIR for errors."
54 + echo $FAI_CONFIG_SRC | grep -q ^nfs://
55 + if [ $? -eq 0 ]; then
56 + grep -q ^$FAI /etc/mtab && umount $FAI
59 +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
62 # cat but no comment lines