Support NO_ADDONS[_BSD4GRML]; always skip mksquashfs part when using -q option
authorMichael Prokop <mika@grml.org>
Mon, 23 Feb 2009 09:40:27 +0000 (10:40 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 23 Feb 2009 09:40:27 +0000 (10:40 +0100)
debian/changelog
etc/grml/grml-live.conf
grml-live

index ac9a054..a845a92 100644 (file)
@@ -46,13 +46,16 @@ grml-live (0.9.9) unstable; urgency=low
     [Closes: issue631]
   * Integrate bsd4grml [hash: 987ce9a6f9ce205ba64794ed3fcac603]. This
     provides MirBSD as bootoption 'bsd' at grml's bootprompt. Thanks to
-    Thorsten "mirabilos" Glaser for his work!
+    Thorsten "mirabilos" Glaser for his work! Add support for
+    configuring NO_ADDONS_BSD4GRML via configuration file.
   * Add informational header to /etc/grml/fai/apt/sources.list and
     update docs regarding the file.
   * If specified SUITE is unstable use 'sid' instead (to avoid breakages
     with debootstrap).
+  * Support NO_ADDONS via configuration file.
+  * Always skip mksquashfs part when using -q option.
 
- -- Michael Prokop <mika@grml.org>  Mon, 23 Feb 2009 02:04:05 +0100
+ -- Michael Prokop <mika@grml.org>  Mon, 23 Feb 2009 10:39:57 +0100
 
 grml-live (0.9.8) unstable; urgency=low
 
index 9ffb051..82765c2 100644 (file)
@@ -113,6 +113,12 @@ GRML_FAI_CONFIG=/etc/grml/fai
 # likes the default directory [/usr/share/grml-live/templates]
 # TEMPLATE_DIRECTORY='/usr/share/grml-live/templates'
 
+# Do you want to skip adding /boot/addons/ (from the template directory)?
+# NO_ADDONS='1'
+
+# Do you want to skip adding /boot/addons/bsd4grml/ (from the template directory)?
+# NO_ADDONS_BSD4GRML='1'
+
 # exclude files from compressed squashfs file using the
 # the mksquashfs option -ef:
 # SQUASHFS_EXCLUDES_FILE="/etc/grml/fai/squashfs-excludes"
index 6beb3ba..5c55828 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -541,7 +541,14 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
       cp ${TEMPLATE_DIRECTORY}/boot/isolinux/*  "$BUILD_OUTPUT"/boot/isolinux/
 
       if [ -z "$NO_ADDONS" ] ; then
-         cp ${TEMPLATE_DIRECTORY}/boot/addons/*    "$BUILD_OUTPUT"/boot/addons/
+         # copy only files so we can handle bsd4grml on its own
+         for file in ${TEMPLATE_DIRECTORY}/boot/addons/* ; do
+             test -f $file && cp $file "$BUILD_OUTPUT"/boot/addons/
+         done
+
+         if [ -z "$NO_ADDONS_BSD4GRML" ] ; then
+            cp -a ${TEMPLATE_DIRECTORY}/boot/addons/bsd4grml "$BUILD_OUTPUT"/boot/addons/
+         fi
       fi
 
       if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then
@@ -622,9 +629,9 @@ fi
 if [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then
    log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'"
    ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ; eend 0
-elif [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -n "$SKIP_MKSQUASHFS" ] ; then
-   log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested"
-   ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs' as requested" ; eend 0
+elif [ -n "$SKIP_MKSQUASHFS" ] ; then
+   log "Skipping stage 'squashfs' as requested via option -q"
+   ewarn "Skipping stage 'squashfs' as requested via option -q" ; eend 0
 else
    [ -d "$BUILD_OUTPUT"/live ] || mkdir "$BUILD_OUTPUT"/live
    # make sure we don't leave (even an empty) base.tgz: