X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=patches%2Ffai_dirupdate_1.diff;fp=patches%2Ffai_dirupdate_1.diff;h=fb6ca3bdf6790325413ab8dff09db693afd1f5b6;hp=0000000000000000000000000000000000000000;hb=0f72adacbce0a22376ccc889598f29d8dd2966d9;hpb=976c75fd6aa78b13ac0630d6401c9339391b59bb diff --git a/patches/fai_dirupdate_1.diff b/patches/fai_dirupdate_1.diff new file mode 100644 index 0000000..fb6ca3b --- /dev/null +++ b/patches/fai_dirupdate_1.diff @@ -0,0 +1,42 @@ +--- /usr/lib/fai/subroutines.orig 2007-09-21 10:04:05.000000000 +0200 ++++ /usr/lib/fai/subroutines 2007-09-21 10:34:40.000000000 +0200 +@@ -266,6 +266,9 @@ + dirinstall) + task dirinstall + ;; ++ dirupdate) ++ task dirupdate ++ ;; + softupdate) + echo Performing FAI system update. All data may be overwritten! + task softupdate +@@ -491,6 +494,29 @@ + fi + } + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ++task_dirupdate() { ++ ++ > $stamp ++ ++ mkdir -p $FAI_ROOT ++ FAI_ROOT=$(cd $FAI_ROOT;pwd) ++ echo "Updating directory $FAI_ROOT" ++ task configure ++ task updatechroot ++ task finish ++ ++ rm -f $stamp ++ unset LOGUSER # so logfile are not saved to remote ++ task savelog ++ ++ if [ -f $stamp ]; then ++ echo "Error while executing commands in subshell." ++ echo "$stamp was not removed." ++ sendmon "TASKERROR install 21" ++ die "Please look at the log files in $LOGDIR for errors." ++ fi ++} ++# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + task_softupdate() { + + local stamp=/var/run/fai/fai_softupdate_is_running