-B build the ISO without touching the chroot (skips cleanup)
-c <classe[s]> classes to be used for building the ISO via FAI
-C <configfile> configuration file for grml-live
-B build the ISO without touching the chroot (skips cleanup)
-c <classe[s]> classes to be used for building the ISO via FAI
-C <configfile> configuration file for grml-live
-F force execution without prompting
-g <grml_name> set the grml flavour name
-h display short usage information and exit
-F force execution without prompting
-g <grml_name> set the grml flavour name
-h display short usage information and exit
[ -n "$BUILD_OUTPUT" ] || BUILD_OUTPUT="$OUTPUT/grml_cd"
[ -n "$CHROOT_OUTPUT" ] || CHROOT_OUTPUT="$OUTPUT/grml_chroot"
[ -n "$CLASSES" ] || CLASSES="GRMLBASE,GRML_MEDIUM,I386"
[ -n "$BUILD_OUTPUT" ] || BUILD_OUTPUT="$OUTPUT/grml_cd"
[ -n "$CHROOT_OUTPUT" ] || CHROOT_OUTPUT="$OUTPUT/grml_chroot"
[ -n "$CLASSES" ] || CLASSES="GRMLBASE,GRML_MEDIUM,I386"
[ -n "$DISTRI_INFO" ] || DISTRI_INFO='Grml - Live Linux for system administrators '
[ -n "$DISTRI_NAME" ] || DISTRI_NAME="grml"
[ -n "$DISTRI_SPLASH" ] || DISTRI_SPLASH='grml.png'
[ -n "$DISTRI_INFO" ] || DISTRI_INFO='Grml - Live Linux for system administrators '
[ -n "$DISTRI_NAME" ] || DISTRI_NAME="grml"
[ -n "$DISTRI_SPLASH" ] || DISTRI_SPLASH='grml.png'
[ -n "$ISO_OUTPUT" ] && echo " ISO target: $ISO_OUTPUT"
[ -n "$GRML_NAME" ] && echo " grml name: $GRML_NAME"
[ -n "$RELEASENAME" ] && echo " release name: $RELEASENAME"
[ -n "$ISO_OUTPUT" ] && echo " ISO target: $ISO_OUTPUT"
[ -n "$GRML_NAME" ] && echo " grml name: $GRML_NAME"
[ -n "$RELEASENAME" ] && echo " release name: $RELEASENAME"
[ -n "$VERSION" ] && echo " grml version: $VERSION"
[ -n "$SUITE" ] && echo " Debian suite: $SUITE"
[ -n "$ARCH" ] && echo " Architecture: $ARCH"
[ -n "$VERSION" ] && echo " grml version: $VERSION"
[ -n "$SUITE" ] && echo " Debian suite: $SUITE"
[ -n "$ARCH" ] && echo " Architecture: $ARCH"
- 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
+ log "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]"
+ echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]" > $CHROOT_OUTPUT/etc/grml_version
chmod 644 $CHROOT_OUTPUT/etc/grml_version
einfo "Rebuilding initramfs"
# make sure new /etc/grml_version reaches the initramfs:
chmod 644 $CHROOT_OUTPUT/etc/grml_version
einfo "Rebuilding initramfs"
# make sure new /etc/grml_version reaches the initramfs:
RELEASE_INFO="$(extend_string_end 68 "$RELEASE_INFO")"
sed -i "s/%RELEASE_INFO%/$GRML_NAME $VERSION - $RELEASENAME/" "$BUILD_OUTPUT"/GRML/grml-version
RELEASE_INFO="$(extend_string_end 68 "$RELEASE_INFO")"
sed -i "s/%RELEASE_INFO%/$GRML_NAME $VERSION - $RELEASENAME/" "$BUILD_OUTPUT"/GRML/grml-version
for file in "${BUILD_OUTPUT}"/boot/isolinux/*.cfg "${BUILD_OUTPUT}"/boot/isolinux/*.msg \
"${BUILD_OUTPUT}"/boot/grub/* ; do
sed -i "s/%ARCH%/$ARCH/g" "${file}"
for file in "${BUILD_OUTPUT}"/boot/isolinux/*.cfg "${BUILD_OUTPUT}"/boot/isolinux/*.msg \
"${BUILD_OUTPUT}"/boot/grub/* ; do
sed -i "s/%ARCH%/$ARCH/g" "${file}"
sed -i "s/%DISTRI_INFO%/$DISTRI_INFO/g" "${file}"
sed -i "s/%DISTRI_NAME%/$DISTRI_NAME/g" "${file}"
sed -i "s/%DISTRI_SPLASH%/$DISTRI_SPLASH/g" "${file}"
sed -i "s/%DISTRI_INFO%/$DISTRI_INFO/g" "${file}"
sed -i "s/%DISTRI_NAME%/$DISTRI_NAME/g" "${file}"
sed -i "s/%DISTRI_SPLASH%/$DISTRI_SPLASH/g" "${file}"
if [ -e "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 ]; then
if [ -e "$BUILD_OUTPUT"/boot/grub/core.img ]; then
GRUB_VERSION=2
if [ -e "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 ]; then
if [ -e "$BUILD_OUTPUT"/boot/grub/core.img ]; then
GRUB_VERSION=2
if [ "$BOOT_METHOD" = "isolinux" ] ; then
BOOT_FILE="boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"
elif [ "$BOOT_METHOD" = "grub" ] ; then
if [ "$BOOT_METHOD" = "isolinux" ] ; then
BOOT_FILE="boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat"
elif [ "$BOOT_METHOD" = "grub" ] ; then