From: Michael Prokop Date: Sat, 12 Dec 2009 13:45:26 +0000 (+0100) Subject: Add support for EXIT_ON_MISSING_PACKAGES X-Git-Tag: v0.9.33~17 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=651bc9e2711b53f189a97dd125ef025aa9a8bd90 Add support for EXIT_ON_MISSING_PACKAGES --- diff --git a/debian/changelog b/debian/changelog index 50e96e9..b35c663 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,9 @@ grml-live (0.9.33) UNRELEASED; urgency=low for bringing this issue up, Richard Hartmann. * templates/boot/grub/menu.lst: drop bootoption lang=us, we specify the default within grml-autoconfig. + * Support configuration variable EXIT_ON_MISSING_PACKAGES to exit + with returncode != 0 if a requested package isn't available on the + resulting ISO. * Software related changes: - Add iscsitarget-module-2.6.31-grml64 to GRML_FULL. - Add nbd-server + nbd-client to GRML_FULL (thanks to Xuân Baldauf). @@ -33,7 +36,7 @@ grml-live (0.9.33) UNRELEASED; urgency=low [ Thorsten Glaser ] * Update MirOS bsd4grml to 20091115. - -- Michael Prokop Wed, 25 Nov 2009 03:21:07 +0100 + -- Michael Prokop Sat, 12 Dec 2009 14:44:14 +0100 grml-live (0.9.32) unstable; urgency=low diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index e4aad8b..096ece9 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -171,4 +171,9 @@ # URL for downloading the windows files: # WINDOWS_BINARIES="http://the.earth.li/~sgtatham/putty/latest/x86/" +# Do you want exit grml-live if some packages were requested for installation +# on fresh installs but are missing on the generated ISO finally? +# By default the package list is sent to stdout but grml-live doesn't interrupt. +# EXIT_ON_MISSING_PACKAGES=1 + ## END OF FILE ################################################################# diff --git a/grml-live b/grml-live index da67813..207f982 100755 --- a/grml-live +++ b/grml-live @@ -1104,9 +1104,18 @@ fi 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 + + 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 [ -n "$start_seconds" ] && SECONDS="$[$(cut -d . -f 1 /proc/uptime)-$start_seconds]" || SECONDS="unknown"