From: Ulrich Dangel Date: Mon, 26 Dec 2011 17:38:21 +0000 (+0100) Subject: Add additinal checks to make sure convert as well as the necessary files are present X-Git-Tag: v0.17.3~23 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=59228b5a14ecf72546704b0094c0013014ebf477 Add additinal checks to make sure convert as well as the necessary files are present for creating the wallper --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper b/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper index ca0a303..bd5f8c4 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper +++ b/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper @@ -19,6 +19,16 @@ if [ ! -x "$(which convert)" ]; then exit 0 fi +if [ ! -f "$GRML_BG" ]; then + echo "Could not find Grml background image, skipping wallpaper" + exit 0 +fi + +if [ ! -f "$FONTFILE" ]; then + echo "Could not find font $FONTFILE, skipping wallpaper" + exit 0 +fi + echo "Creating standard wallpaper" convert "$GRML_BG" -gravity center \ diff --git a/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper b/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper index 283f54f..675f63a 100755 --- a/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper +++ b/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper @@ -15,6 +15,22 @@ GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg} echo "Creating release wallpaper" +if [ ! -x "$(which convert)" ]; then + echo "convert not installed, skipping release wallpaper." + exit 0 +fi + +if [ ! -f "$GRML_BG" ]; then + echo "Could not find Grml background image, skipping release wallpaper" + exit 0 +fi + +if [ ! -f "$FONTFILE" ]; then + echo "Could not find font $FONTFILE, skipping release wallpaper" + exit 0 +fi + + convert "$GRML_BG" -gravity center \ -fill white -font "$FONTFILE" \ -pointsize $TITLE_FONTSIZE \