Permalink
Browse files

Execute removal of log files after sourcing config files

  • Loading branch information...
1 parent 1227c08 commit 67304be75bd8ee0e517ea3f8e409c06fa7a00c26 Michael Prokop committed Dec 9, 2007
Showing with 19 additions and 13 deletions.
  1. +1 −0 debian/changelog
  2. +18 −13 grml-live
View
@@ -17,6 +17,7 @@ grml-live (0.0.12) unstable; urgency=low
* Do not exit if cleanup of /root directory in 98-clean-chroot fails.
* Skip stage updatebase when using softupdate and handle upgrade
on our own via hooks.
+ * Execute removal of log files after sourcing config files.
-- Michael Prokop <mika@grml.org> Sun, 09 Dec 2007 17:28:01 +0100
View
@@ -91,19 +91,6 @@ fi
touch $LOGFILE
chown root:adm $LOGFILE
chmod 640 $LOGFILE
-# clean/zero grml-live logfile:
-if [ -n "$ZERO_LOGFILE" ] ; then
- echo -n > $LOGFILE
-fi
-
-# clean/zero/remove old FAI directory:
-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
NFSROOT_CONF=/etc/grml/fai/make-fai-nfsroot.conf
@@ -232,6 +219,24 @@ else
log "No $LOCAL_CONFIG found, not sourcing it"
LOCAL_CONFIG=''
fi
+
+# clean/zero grml-live logfile:
+if [ -n "$ZERO_LOGFILE" ] ; then
+ echo -n > $LOGFILE
+fi
+
+# clean/zero/remove old FAI directory:
+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)"
+ rm -f /var/log/fai/"$HOSTNAME"/last \
+ /var/log/fai/"$HOSTNAME"/last-dirinstall \
+ /var/log/fai/"$HOSTNAME"/last-softupdate
+ fi
+fi
+
# }}}
# ask user whether the setup is ok {{{

0 comments on commit 67304be

Please sign in to comment.