Remove last-dirinstall and last-softupdate logs
authorMichael Prokop <devnull@localhost>
Sun, 9 Dec 2007 15:22:50 +0000 (16:22 +0100)
committerMichael Prokop <devnull@localhost>
Sun, 9 Dec 2007 15:22:50 +0000 (16:22 +0100)
debian/changelog
grml-live

index 164a47f..7271a3f 100644 (file)
@@ -9,6 +9,9 @@ grml-live (0.0.11) unstable; urgency=low
   * Adjust grml-buildd for new logdir structure.
   * Add new script /etc/grml/fai/config/scripts/GRMLBASE/40-deborphan
     which adds shadowfs and bsdtar to the 'never report'-list of deborphan.
+  * Diplay use of $LOCAL_CONFIG in configuration dialog.
+  * Remove fai's last-dirinstall and last-softupdate when using
+    ZERO_FAI_LOGFILE as well.
   * Add new packages to GRML_FULL:
     - atl2-modules-2.6.23-grml
     - firmware-ralink (replaces firmware-rt61 and firmware-rt73)
index 970fa6b..199edaa 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -100,6 +100,8 @@ fi
 if [ -n "$ZERO_FAI_LOGFILE" ] ; then
    if [ -d /var/log/fai/"$HOSTNAME" ] ; then
       rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last)"
+      rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-dirinstall)"
+      rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last-softupdate)"
    fi
 fi
 
@@ -221,6 +223,17 @@ specify it on the command line using the -c option."
 specify it on the command line using the -o option."
 # }}}
 
+# read local (non-packaged) configuration {{{
+LOCAL_CONFIG=/etc/grml/grml-live.local
+if [ -r "$LOCAL_CONFIG" ] ; then
+   log "Sourcing $LOCAL_CONFIG"
+   . $LOCAL_CONFIG
+else
+   log "No $LOCAL_CONFIG found, not sourcing it"
+   LOCAL_CONFIG=''
+fi
+# }}}
+
 # ask user whether the setup is ok {{{
 if [ -z "$FORCE" ] ; then
    echo
@@ -229,6 +242,7 @@ if [ -z "$FORCE" ] ; then
    echo "  FAI classes:       $CLASSES"
    echo "  main directory:    $OUTPUT"
    [ -n "$CONFIG" ]        && echo "  configuration:     $CONFIG"
+   [ -r "$LOCAL_CONFIG" ]  && echo "  local config:      /etc/grml/grml-live.local"
    [ -n "$CHROOT_OUTPUT" ] && echo "  chroot target:     $CHROOT_OUTPUT"
    [ -n "$BUILD_OUTPUT" ]  && echo "  build target:      $BUILD_OUTPUT"
    [ -n "$ISO_OUTPUT" ]    && echo "  ISO target:        $ISO_OUTPUT"
@@ -253,15 +267,6 @@ if [ -z "$FORCE" ] ; then
    echo
 fi
 
-# read local (non-packaged) configuration:
-LOCAL_CONFIG=/etc/grml/grml-live.local
-if [ -r "$LOCAL_CONFIG" ] ; then
-   log "Sourcing $LOCAL_CONFIG"
-   . $LOCAL_CONFIG
-else
-   LOCAL_CONFIG=''
-fi
-
 if [ -n "$CONFIG" ] ; then
    if ! [ -f "$CONFIG" ] ; then
       log "Sorry, $CONFIG could not be read. Exiting. [$(date)]"