Support mksquashfs-lzma and $MKSQUASHFS in remaster/grml-live-remaster
authorMichael Prokop <mika@grml.org>
Sat, 24 Oct 2009 00:59:59 +0000 (02:59 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 24 Oct 2009 01:00:40 +0000 (03:00 +0200)
debian/changelog
remaster/grml-live-remaster

index 7af073d..2bc25c9 100644 (file)
@@ -8,7 +8,10 @@ grml-live (0.9.25) UNRELEASED; urgency=low
   * Clear at first the screen if bootparam quiet is set.
     Thanks again to Michael Schierl for his bug report.
 
   * Clear at first the screen if bootparam quiet is set.
     Thanks again to Michael Schierl for his bug report.
 
- -- Ulrich Dangel <mru@grml.org>  Fri, 23 Oct 2009 19:07:23 +0200
+  [ Michael Prokop ]
+  * Support mksquashfs-lzma and $MKSQUASHFS in remaster/grml-live-remaster.
+
+ -- Michael Prokop <mika@grml.org>  Sat, 24 Oct 2009 03:00:12 +0200
 
 grml-live (0.9.24) unstable; urgency=low
 
 
 grml-live (0.9.24) unstable; urgency=low
 
index a340592..69b8f04 100755 (executable)
@@ -30,7 +30,19 @@ GRML_LIVE_EDITOR=${VISUAL:-${EDITOR:-vi}}
 # }}}
 
 # make sure we have what we need {{{
 # }}}
 
 # make sure we have what we need {{{
-check4progs mkisofs mksquashfs stat || exit 1
+check4progs mkisofs stat || exit 1
+
+# allow overriding via environment:
+if [ -z "$MKSQUASHFS" ] ; then
+  if which mksquashfs-lzma >/dev/null 2>&1 ; then
+    MKSQUASHFS=mksquashfs-lzma
+  elif which mksquashfs >/dev/null 2>&1 ; then
+    MKSQUASHFS=mksquashfs
+  else
+    echo "Error: neither mksquashfs-lzma nor mksquashfs present. Exiting."
+    exit 1
+  fi
+fi
 check4root || exit 1
 # }}}
 
 check4root || exit 1
 # }}}
 
@@ -107,7 +119,7 @@ sed 3,4d "${BOOTSTUFF}"/boot.msg \
 sed 1,2d /remaster/msg >>/remaster/iso/boot/isolinux/boot.msg
 
 mkdir /remaster/iso/live
 sed 1,2d /remaster/msg >>/remaster/iso/boot/isolinux/boot.msg
 
 mkdir /remaster/iso/live
-mksquashfs /remaster/chroot /remaster/iso/live/"$(basename $SQUASHFS_FILE)"
+$MKSQUASHFS /remaster/chroot /remaster/iso/live/"$(basename $SQUASHFS_FILE)"
 umount /remaster/chroot /remaster/cdrom
 
 if [ -f /remaster/iso/boot/isolinux/isolinux.bin ] ; then
 umount /remaster/chroot /remaster/cdrom
 
 if [ -f /remaster/iso/boot/isolinux/isolinux.bin ] ; then