From 00fd941eccd2032da97f112e448c06cd5c1c62e5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 8 Jul 2011 13:43:29 +0200 Subject: [PATCH 1/1] Drop patches/ directory, patch fai_chroot_update.patch is not relevant anymore. --- patches/fai_chroot_update.patch | 63 ----------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 patches/fai_chroot_update.patch diff --git a/patches/fai_chroot_update.patch b/patches/fai_chroot_update.patch deleted file mode 100644 index 350f613..0000000 --- a/patches/fai_chroot_update.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- subroutines.orig 2007-12-16 11:20:12.000000000 +0000 -+++ subroutines 2007-12-16 11:23:01.000000000 +0000 -@@ -294,6 +294,10 @@ - echo Performing FAI system update. All data may be overwritten! - task softupdate - ;; -+ chrootupdate) -+ echo Performing FAI chroot update. All data may be overwritten! -+ task chrootupdate -+ ;; - sysinfo) - echo Showing system information. - task sysinfo -@@ -568,6 +572,49 @@ - } - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+task_chrootupdate() { -+ -+ local stamp=/var/run/fai/fai_chrootupdate_is_running -+ -+ [ -f "$stamp" ] && die "Another fai chrootupdate 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/ -+ fi -+ # the following copy operation is required to make $LOGDIR a reliable source -+ # for disk_var.sh -+ # use the last disk_var during update if available -+ [ -f /var/lib/fai/disk_var.sh ] && cp -p /var/lib/fai/disk_var.sh $LOGDIR -+ -+ defnop wait_for_jobs -+ save_dmesg -+ -+ task mirror -+ task debconf -+ task configure -+ date -+ echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] seconds." -+ -+ rm -f $stamp -+ # save again, because new messages could be created -+ save_dmesg -+ task savelog -+ -+ if [ -f $stamp ]; then -+ echo "Error while executing commands in subshell." -+ echo -n "$stamp was not removed. PID of running process: " -+ cat $stamp -+ sendmon "TASKERROR chrootupdate 21" -+ die "Please look at the log files in $LOGDIR for errors." -+ fi -+ echo $FAI_CONFIG_SRC | grep -q ^nfs:// -+ if [ $? -eq 0 ]; then -+ grep -q ^$FAI /etc/mtab && umount $FAI -+ fi -+} -+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+ - catnc() { - # cat but no comment lines - egrep -v "^#" $@ -- 2.1.4