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

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: Marcel Kolaja <mkolaja@redhat.com>
a85e8e
Date: Tue, 21 Jan 2014 10:57:08 -0500
d41074
Subject: [PATCH] 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
d41074
index ca040dd776c..b00f9e61f40 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