From: Michael Prokop Date: Thu, 4 Sep 2008 11:29:10 +0000 (+0200) Subject: Improve checks for -[no]lzma for different squashfs-tools. X-Git-Tag: 0.9.3~5 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=152f1d98e09e062d74b1b1a0c2e19fdd8f5d7585 Improve checks for -[no]lzma for different squashfs-tools. --- diff --git a/debian/changelog b/debian/changelog index d404d4f..4b60585 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,15 @@ +grml-live (0.9.2) unstable; urgency=low + + * Improve checks for -[no]lzma for different squashfs-tools. + + -- Michael Prokop Thu, 04 Sep 2008 13:28:48 +0200 + grml-live (0.9.1) unstable; urgency=low * Rebuild initramfs to make sure that the up2date /etc/grml_version is available in the live initramfs. [Closes: issue516] - -- Michael Prokop Mon, 01 Sep 2008 23:51:50 +0200 + -- Michael Prokop Thu, 04 Sep 2008 13:27:35 +0200 grml-live (0.9.0) unstable; urgency=low diff --git a/grml-live b/grml-live index 36190ad..37f688b 100755 --- a/grml-live +++ b/grml-live @@ -14,7 +14,7 @@ export LC_ALL=C # exit on any error: set -e -GRML_LIVE_VERSION='0.9.1' +GRML_LIVE_VERSION='0.9.2' PN="$(basename $0)" CMDLINE="$0 $@" ISO_DATE="$(date +%Y-%m-%d)" @@ -423,7 +423,9 @@ else log "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" > $CHROOT_OUTPUT/etc/grml_version chmod 644 $CHROOT_OUTPUT/etc/grml_version + einfo "Rebuilding initramfs" chroot $CHROOT_OUTPUT update-initramfs -u -t # make sure new /etc/grml_version reaches the initramfs + eend $? fi # Remove all FAI logs from chroot if class RELEASE is used: @@ -601,9 +603,19 @@ else fi if echo "$SQUASHFS_OPTIONS" | grep -q -- "-nolzma" ; then - ewarn "mksquashfs does NOT support the nolzma option, falling back to zlib mode." - SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-nolzma//g')" - eend 0 + if ! mksquashfs --help 2>&1 | grep -q -- '-nolzma' ; then + ewarn "mksquashfs does NOT support the nolzma option, just using default zlib mode." + SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-nolzma//g')" + eend 0 + fi + fi + + if echo "$SQUASHFS_OPTIONS" | grep -q -- "-lzma" ; then + if ! mksquashfs --help 2>&1 | grep -q -- '-lzma' ; then + ewarn "mksquashfs does NOT support the lzma option, falling back to zlib mode." + SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-lzma//g')" + eend 0 + fi fi SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)"