From: Michael Prokop Date: Thu, 25 Oct 2007 23:23:51 +0000 (+0200) Subject: buildd: do not re-execute grml-live is the target ISO exists already; check for prese... X-Git-Tag: 0.0.7~34 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=19df4611c634f48c2ea0d321083e55bd0a2eeae4 buildd: do not re-execute grml-live is the target ISO exists already; check for presence of /bin/zsh in usersetup --- diff --git a/buildd/functions.sh b/buildd/functions.sh index 566fa82..a1e57df 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -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: Wed Oct 24 11:07:47 CEST 2007 [mika] +# Latest change: Thu Oct 25 22:40:45 CEST 2007 [mika] ################################################################################ die() { @@ -48,35 +48,40 @@ echo "my_hdr From: grml-live autobuild daemon <$FROM>" > $MUTT_HEADERS # execute grml-live: grml_live_run() { -grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ - -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \ - 1>$GRML_LOGFILES/grml-buildd.stdout \ - 2>$GRML_LOGFILES/grml-buildd.stderr ; RC=$? - -if [ "$RC" = "0" ] ; then - RC_INFO=success -else - RC_INFO=error -fi + if [ -f "$ISO_DIR/$ISO_NAME" ] ; then + echo "$ISO_DIR/$ISO_NAME exists already. Nothing to be done, exiting." + exit 0 + fi + + grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ + -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \ + 1>$GRML_LOGFILES/grml-buildd.stdout \ + 2>$GRML_LOGFILES/grml-buildd.stderr ; RC=$? + + if [ "$RC" = "0" ] ; then + RC_INFO=success + else + RC_INFO=error + fi } # create log archive: create_logs() { -( cd / && tar zcf $ATTACHMENT var/log/fai/dirinstall/grml 1>/dev/null ) + ( cd / && tar zcf $ATTACHMENT var/log/fai/dirinstall/grml 1>/dev/null ) } # store information of ISO size: iso_details() { -if ! [ -f "$OUTPUT_DIR/grml_isos/$ISO_NAME" ] ; then - ISO_DETAILS="There was an error creating $ISO_NAME" -else - ISO_DETAILS=$(ls -lh $OUTPUT_DIR/grml_isos/$ISO_NAME) -fi + if ! [ -f "$OUTPUT_DIR/grml_isos/$ISO_NAME" ] ; then + ISO_DETAILS="There was an error creating $ISO_NAME" + else + ISO_DETAILS=$(ls -lh $OUTPUT_DIR/grml_isos/$ISO_NAME) + fi } # send status mail: send_mail() { -echo -en "Automatically generated mail by $SCRIPTNAME + echo -en "Automatically generated mail by $SCRIPTNAME $ISO_DETAILS @@ -91,9 +96,9 @@ The following warnings have been noticed: $(grep warn $FAI_LOGFILES/* || echo "* nothing") Find details in the attached logs." | \ -mutt -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \ - -a $ATTACHMENT \ - $RECIPIENT + mutt -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \ + -a $ATTACHMENT \ + $RECIPIENT } # make sure we store the final iso: diff --git a/debian/changelog b/debian/changelog index 7843466..cf1cd58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ grml-live (0.0.7) unstable; urgency=low grml-live.{stdout,stderr} as log files. - buildd/functions.sh: do not mv files if there was an error during grml-live execution + - do not re-execute grml-live is the target ISO exists already * Added new grml-repository named grml-live which is intented to fix issues from Debian for grml-live builds. It is automatically activated if you are building against unstable/sid and should @@ -20,6 +21,8 @@ grml-live (0.0.7) unstable; urgency=low by default. * Set $SECONDS to unknown if $start_seconds is not set. * Improve directory handling for $LOGFILE. + * Check for presence of /bin/zsh before setting default shell in + /etc/grml/fai/config/scripts/GRMLBASE/21-usersetup * Add new packages to GRML_FULL: - ldnsutils - madwifi-modules-2.6.23-grml diff --git a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup index 4f7ec49..2778642 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/21-usersetup @@ -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: Thu Oct 18 19:47:14 CEST 2007 [mika] +# Latest change: Fri Oct 26 01:22:30 CEST 2007 [mika] ################################################################################ set -u @@ -38,8 +38,10 @@ fi sed -i 's/^root::/root:*:/' $target/etc/shadow sed -i "s/^$USERNAME:!:/$USERNAME:*:/" $target/etc/shadow -$ROOTCMD chsh -s /bin/zsh root -$ROOTCMD chsh -s /bin/zsh $USERNAME +if [ -r $target/bin/zsh ] ; then + $ROOTCMD chsh -s /bin/zsh root + $ROOTCMD chsh -s /bin/zsh $USERNAME +fi ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3