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

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