X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-live;h=199edaa8de4f4f24ede7624171c3a6973e952e7b;hb=03d6cbdfdfe85a9823fac9ec86b34517efb0011c;hp=a4a1fa83ade60083beece15097c30eca910e767b;hpb=2124a2fe0748887da88662abc5ce7c2c643120b8;p=grml-live.git diff --git a/grml-live b/grml-live index a4a1fa8..199edaa 100755 --- 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 @@ -187,7 +189,7 @@ http://grml.org/bugs/ # command line parsing {{{ -while getopts "a:C:c:g:i:o:r:s:t:v:FhuV" opt; do +while getopts "a:C:c:g:i:o:r:s:t:v:FhuVz" opt; do case "$opt" in a) ARCH="$OPTARG" ;; c) CLASSES="$OPTARG" ;; @@ -207,6 +209,7 @@ while getopts "a:C:c:g:i:o:r:s:t:v:FhuV" opt; do h) usage ; bailout 0 ;; u) UPDATE=1 ;; V) VERBOSE="-v" ;; + z) SQUASHFS_ZLIB="-nolzma" ;; ?) echo "invalid option -$OPTARG" >&2; bailout 1 ;; esac done @@ -220,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 @@ -228,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" @@ -241,6 +256,7 @@ if [ -z "$FORCE" ] ; then [ -n "$FAI_ARGS" ] && echo " additional arguments for FAI: $FAI_ARGS" [ -n "$LOGFILE" ] && echo " Logging to file: $LOGFILE" [ -n "$VERBOSE" ] && echo " Using VERBOSE mode." + [ -n "$SQUASHFS_ZLIB" ] && echo " Using ZLIB (instead od LZMA) compression." [ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation." echo echo -n "Is this ok for you? [y/N] " @@ -251,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)]" @@ -536,7 +543,7 @@ else # execute squashfs: log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend" - mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend + mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB log "Finished execution of stage 'squashfs' [$(date)]" einfo "Finished execution of stage 'squashfs'" ; eend 0 fi