Add check for existence of -nolzma option
authorMichael Prokop <devnull@localhost>
Thu, 8 May 2008 14:23:32 +0000 (16:23 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 8 May 2008 14:23:32 +0000 (16:23 +0200)
debian/changelog
docs/grml-live.txt
grml-live

index 037c098..54cc597 100644 (file)
@@ -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 <mika@grml.org>  Wed, 26 Mar 2008 22:56:31 +0100
 
index 47f5b94..5f889e3 100644 (file)
@@ -17,7 +17,7 @@ grml-live [-a <architecture>] [-c <classe[s]>] [-g <grml_name>] [-i <iso_name> ]
 *******************************************************************************
 Important! This document is growing as requested. If you have questions which
 aren't answered by this document yet please let me know: <mika@grml.org>!
-This document currently applies to grml-live version 0.5.
+This document currently applies to grml-live version 0.7.
 *******************************************************************************
 
 Description
index 1afacbd..cebe8ae 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # 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