From f898e60bf9ebd885066e6be5596ccc423aa203b4 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 8 May 2008 16:23:32 +0200 Subject: [PATCH] Add check for existence of -nolzma option --- debian/changelog | 2 ++ docs/grml-live.txt | 2 +- grml-live | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 037c098..54cc597 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ grml-live (0.7) unstable; urgency=low * Make sure username is adjusted in /etc/inittab.grml if username not being "grml". Thanks for reporting, Thomas Lehmann. [Testing: issue436] + * Add check for existence of -nolzma option. If squashfs-tools + doesn't support it at all just get rid of the option. -- Michael Prokop Wed, 26 Mar 2008 22:56:31 +0100 diff --git a/docs/grml-live.txt b/docs/grml-live.txt index 47f5b94..5f889e3 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -17,7 +17,7 @@ grml-live [-a ] [-c ] [-g ] [-i ] ******************************************************************************* Important! This document is growing as requested. If you have questions which aren't answered by this document yet please let me know: ! -This document currently applies to grml-live version 0.5. +This document currently applies to grml-live version 0.7. ******************************************************************************* Description diff --git a/grml-live b/grml-live index 1afacbd..cebe8ae 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 Feb 23 11:12:27 CET 2008 [mika] +# Latest change: Thu May 08 16:22:55 CEST 2008 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -15,7 +15,7 @@ export LC_ALL=C # exit on any error: set -e -GRML_LIVE_VERSION='0.6' +GRML_LIVE_VERSION='0.7' CMDLINE="$0 $@" ISO_DATE="$(date +%Y-%m-%d)" @@ -565,14 +565,20 @@ else # make sure we don't leave (even an empty) base.tgz: [ -f "$CHROOT_OUTPUT/base.tgz" ] && rm -f "$CHROOT_OUTPUT/base.tgz" + # make sure mksquashfs can handle the according option: + if [ -n "$SQUASHFS_ZLIB" ] ; then + mksquashfs --help 2>&1 | grep -q -- "$SQUASHFS_ZLIB" || SQUASHFS_ZLIB='' + fi + # execute squashfs: if mksquashfs --help 2>&1 | grep -q -- -no-progress ; then - log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend -no-progress" + log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB else - log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend" + log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB fi + echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module log "Finished execution of stage 'squashfs' [$(date)]" einfo "Finished execution of stage 'squashfs'" ; eend 0 -- 2.1.4