X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-live;h=f10006637bd37a41b548b08e863a070c8ff58422;hb=fbc6752a6ecc2c2c135b9d8114612914b854d1e2;hp=29d19f973e3d637d32c621b407acae7c490b5423;hpb=0a249151a07fb36736c71b53b029eb0342385679;p=grml-live.git diff --git a/grml-live b/grml-live index 29d19f9..f100066 100755 --- a/grml-live +++ b/grml-live @@ -416,6 +416,22 @@ if [ -n "$SUITE" ] ; then done fi +# validate whether the specified architecture class matches the +# architecture (option), otherwise installation of kernel will fail +if echo $CLASSES | grep -qi i386 ; then + if ! [[ "$ARCH" == "i386" ]] ; then + eerror "You specified the I386 class but are trying to build something else (AMD64?)." + eerror "-> Either invoke grml-live with '-i i386' or adjust the architecture class. Exiting." + bailout + fi +elif echo $CLASSES | grep -qi amd64 ; then + if ! [[ "$ARCH" == "amd64" ]] ; then + eerror "You specified the AMD64 class but are trying to build something else (I386?)." + eerror "-> Either invoke grml-live with '-i amd64' or adjust the architecture class. Exiting." + bailout + fi +fi + # set $ARCH [ -n "$ARCH" ] || ARCH="$(dpkg --print-architecture)" if grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' "$NFSROOT_CONF" ; then @@ -431,6 +447,12 @@ if [ -n "$BUILD_DIRTY" ]; then else [ -n "$CHROOT_OUTPUT" ] || CHROOT_OUTPUT="$OUTPUT/grml_chroot" + # inform fai about the suite we build + if [ -n "$SUITE" ] ; then + [ -d "$CHROOT_OUTPUT/etc/grml" ] || mkdir -p "$CHROOT_OUTPUT/etc/grml" + echo "SUITE=$SUITE" > "$CHROOT_OUTPUT/etc/grml/grml-live-build-info" + fi + if [ -n "$UPDATE" -o -n "$BUILD_ONLY" ] ; then FAI_ACTION=softupdate else @@ -765,27 +787,26 @@ elif [ "$BOOT_METHOD" = "grub" ] ; then fi if [ -f "${ISO_OUTPUT}/${ISO_NAME}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then + log "$ISO_OUTPUT exists already, skipping stage 'iso build'" + ewarn "$ISO_OUTPUT exists already, skipping stage 'iso build'" ; eend 0 +else + mkdir -p "$ISO_OUTPUT" || bailout 6 "Problem with creating $ISO_OUTPUT for stage 'iso build'" # support mkisofs as well as genisoimage if which mkisofs >/dev/null 2>&1; then - MKISOFS=mkisofs + MKISOFS='mkisofs' elif which genisoimage >/dev/null 2>&1; then - MKISOFS=genisoimage + MKISOFS='genisoimage' else log "Sorry, neither mkisofs nor genisoimage available - can not create ISO." eerror "Sorry, neither mkisofs nor genisoimage available - can not create ISO." ; eend 1 bailout fi - log "$ISO_OUTPUT exists already, skipping stage 'iso build'" - ewarn "$ISO_OUTPUT exists already, skipping stage 'iso build'" ; eend 0 -else - mkdir -p "$ISO_OUTPUT" || bailout 6 "Problem with creating $ISO_OUTPUT for stage 'iso build'" - CURRENT_DIR=$(pwd) if cd "$BUILD_OUTPUT" ; then log "$MKISOFS -V '${GRML_NAME} ${VERSION}' -publisher 'grml-live | grml.org' -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b $BOOT_FILE -o ${ISO_OUTPUT}/${ISO_NAME} ." - $MKISOFS -V "${GRML_NAME} ${VERSION}" -publisher 'grml-live | grml.org' \ + "$MKISOFS" -V "${GRML_NAME} ${VERSION}" -publisher 'grml-live | grml.org' \ -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \ -b $BOOT_FILE -no-pad \ -o "${ISO_OUTPUT}/${ISO_NAME}" . ; RC=$? @@ -857,8 +878,8 @@ fi # finalize {{{ [ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown" -einfo "Sucessfully finished execution of $PN [running ${SECONDS} seconds]" ; eend 0 -log "Sucessfully finished execution of $PN [running ${SECONDS} seconds]" +einfo "Successfully finished execution of $PN [running ${SECONDS} seconds]" ; eend 0 +log "Successfully finished execution of $PN [running ${SECONDS} seconds]" bailout 0 # }}}