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

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