Blame SOURCES/0125-Honor-a-symlink-when-generating-configuration-by-gru.patch

a85e8e
From 59bf229ab8f723b8dac858475c9a3cfc6d71987b Mon Sep 17 00:00:00 2001
a85e8e
From: Marcel Kolaja <mkolaja@redhat.com>
a85e8e
Date: Tue, 21 Jan 2014 10:57:08 -0500
a85e8e
Subject: [PATCH 125/260] Honor a symlink when generating configuration by
a85e8e
 grub2-mkconfig
a85e8e
a85e8e
Honor a symlink when generating configuration by grub2-mkconfig, so that
a85e8e
the -o option follows it rather than overwriting it with a regular file.
a85e8e
---
a85e8e
 util/grub-mkconfig.in | 3 ++-
a85e8e
 1 file changed, 2 insertions(+), 1 deletion(-)
a85e8e
a85e8e
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
a85e8e
index ca040dd77..b00f9e61f 100644
a85e8e
--- a/util/grub-mkconfig.in
a85e8e
+++ b/util/grub-mkconfig.in
a85e8e
@@ -272,7 +272,8 @@ and /etc/grub.d/* files or please file a bug report with
a85e8e
     echo >&2
a85e8e
   else
a85e8e
     # none of the children aborted with error, install the new grub.cfg
a85e8e
-    mv -f ${grub_cfg}.new ${grub_cfg}
a85e8e
+    cat ${grub_cfg}.new > ${grub_cfg}
a85e8e
+    rm -f ${grub_cfg}.new
a85e8e
   fi
a85e8e
 fi
a85e8e
 
a85e8e
-- 
a85e8e
2.13.0
a85e8e