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

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