Author: eelco
Date: Wed Apr 18 14:28:30 2012
New Revision: 33830
URL: https://nixos.org/websvn/nix/?rev=33830&sc=1

Log:
* Handle the case where there is no GRUB 1 splash image.

Modified:
   nixos/trunk/modules/installer/grub/grub-menu-builder.sh

Modified: nixos/trunk/modules/installer/grub/grub-menu-builder.sh
==============================================================================
--- nixos/trunk/modules/installer/grub/grub-menu-builder.sh     Wed Apr 18 
14:17:09 2012        (r33829)
+++ nixos/trunk/modules/installer/grub/grub-menu-builder.sh     Wed Apr 18 
14:28:30 2012        (r33830)
@@ -45,13 +45,13 @@
 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 @@
     # 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
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to