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

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