From 6a194dc7a547d38991661f50aee86ad0907da6db Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 24 Oct 2007 09:27:01 +0200 Subject: [PATCH] Improve directory handling for $LOGFILE --- debian/changelog | 1 + grml-live | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index da52c5e..4556636 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ grml-live (0.0.7) unstable; urgency=low file. * Log executed grml-live command line. * Set $SECONDS to unknown if $start_seconds is not set. + * Improve directory handling for $LOGFILE. * Add new packages to GRML_FULL: - ldnsutils diff --git a/grml-live b/grml-live index a9ecab0..766f588 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sat Oct 20 12:12:23 CEST 2007 [mika] +# Latest change: Wed Oct 24 09:26:39 CEST 2007 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -69,7 +69,8 @@ trap bailout 1 2 3 15 [ -n "$RELEASENAME" ] || RELEASENAME="grml-live rocks" [ -n "$GRML_NAME" ] || GRML_NAME='grml' -if mkdir -p /var/log/fai/dirinstall/${HOSTNAME} ; then +[ -d /var/log/fai/dirinstall/"${HOSTNAME}" ] || mkdir -p /var/log/fai/dirinstall/${HOSTNAME} +if [ -d /var/log/fai/dirinstall/"${HOSTNAME}" ] ; then LOGFILE=/var/log/fai/dirinstall/${HOSTNAME}/grml-live.log else LOGFILE="$LOGDIR/grml-live.log" -- 2.1.4