From cb74284b75948e6a47d7940ac50c49d89fa6537c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Apr 2012 14:28:30 +0000 Subject: [PATCH] * Handle the case where there is no GRUB 1 splash image. svn path=/nixos/trunk/; revision=33830 --- modules/installer/grub/grub-menu-builder.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/installer/grub/grub-menu-builder.sh b/modules/installer/grub/grub-menu-builder.sh index c6e307828223..59c35c911796 100644 --- a/modules/installer/grub/grub-menu-builder.sh +++ b/modules/installer/grub/grub-menu-builder.sh @@ -45,13 +45,13 @@ fi prologue() { case "$grubVersion" in 1) - cp -f "@splashImage@" /boot/background.xpm.gz cat > "$1" << GRUBEND # Automatically generated. DO NOT EDIT THIS FILE! default @default@ timeout @timeout@ GRUBEND - if test -n "@splashImage@"; then + if [ -n "@splashImage@" ]; then + cp -f "@splashImage@" /boot/background.xpm.gz echo "splashimage $bootRoot/background.xpm.gz" >> "$1" fi ;; @@ -147,7 +147,7 @@ copyToKernelsDir() { # kernels or initrd if this script is ever interrupted. if ! test -e $dst; then local dstTmp=$dst.tmp.$$ - cp $src $dstTmp + cp "$src" "$dstTmp" mv $dstTmp $dst fi filesCopied[$dst]=1