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