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

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