set -e
# global variables
-GRML_LIVE_VERSION='0.9.33-pre1'
+GRML_LIVE_VERSION='0.9.34-pre1'
PN="$(basename $0)"
CMDLINE="$0 $@"
SOURCES_LIST_FILE='/etc/grml/fai/apt/sources.list'
if ! [[ "$ARCH" == "i386" ]] ; then
log "Error: You specified the I386 class but are trying to build something else (AMD64?)."
eerror "Error: You specified the I386 class but are trying to build something else (AMD64?)."
- eerror "Tip: Either invoke grml-live with '-i i386' or adjust the architecture class. Exiting."
+ eerror "Tip: Either invoke grml-live with '-a i386' or adjust the architecture class. Exiting."
eend 1
bailout
fi
if ! [[ "$ARCH" == "amd64" ]] ; then
log "Error: You specified the AMD64 class but are trying to build something else (I386?)."
eerror "Error: You specified the AMD64 class but are trying to build something else (I386?)."
- eerror "Tip: Either invoke grml-live with '-i amd64' or adjust the architecture class. Exiting."
+ eerror "Tip: Either invoke grml-live with '-a amd64' or adjust the architecture class. Exiting."
eend 1
bailout
fi
fi # BUILD_DIRTY?
# }}}
+# package validator {{{
+CHECKLOG=/var/log/fai/$HOSTNAME/last
+# package validator
+if [ -r "$CHECKLOG/package_errors.log" ] && grep -q '[a-z]' "$CHECKLOG/package_errors.log" ; then
+
+ if [ -n "$EXIT_ON_MISSING_PACKAGES" ] ; then
+ eerror "The following packages were requested for installation but could not be processed:"
+ cat $CHECKLOG/package_errors.log
+ eerror "... exiting as requested via \$EXIT_ON_MISSING_PACKAGES."
+ eend 1
+ bailout 13
+ else
+ ewarn "The following packages were requested for installation but could not be processed:"
+ cat $CHECKLOG/package_errors.log
+ eend 0
+ fi
+fi
+# }}}
+
# BUILD_OUTPUT - execute arch specific stuff and squashfs {{{
[ -n "$BUILD_OUTPUT" ] || BUILD_OUTPUT="$OUTPUT/grml_cd"
mkdir -p "$BUILD_OUTPUT" || bailout 6 "Problem with creating $BUILD_OUTPUT for stage ARCH"
log "Installing /boot/memtest86+.bin"
cp /boot/memtest86+.bin "$BUILD_OUTPUT"/boot/addons/memtest
else
- ewarn "No memtest binary found, skipping."
- log "No memtest binary found, skipping."
+ ewarn "No memtest binary found (either install package grml-live-addons or memtest86+), skipping."
+ log "No memtest binary found (either install package grml-live-addons or memtest86+), skipping."
eend 0
fi
fi
# }}}
# finalize {{{
-CHECKLOG=/var/log/fai/$HOSTNAME/last
-# package validator
-if [ -r "$CHECKLOG/package_errors.log" ] && grep -q '[a-z]' "$CHECKLOG/package_errors.log" ; then
- ewarn "The following packages were requested for installation but could not be processed:"
- cat $CHECKLOG/package_errors.log
- eend 0
-fi
-
[ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"
einfo "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]" ; eend 0
log "Successfully finished execution of $PN [$(date) - running ${SECONDS} seconds]"