Skip to contentSkip to conversation

Honor a symlink when generating configuration by grub2-mkconfig

PATCH In review Javier Martinez Canillas 2 participants 2 messages Sep 17, 2019 – Sep 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Honor a symlink when generating configuration by grub2-mkconfig

From: Marcel Kolaja <[email protected]>

Honor a symlink when generating configuration by grub2-mkconfig, so that the -o option follows it rather than overwriting it with a regular file.

---

 util/grub-mkconfig.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
util/grub-mkconfig.in +2 -1
index 9f477ff0546..523d4e029bb 100644
@@ -287,7 +287,8 @@ and /etc/grub.d/* files or please file a bug report with
     exit 1
   else
     # none of the children aborted with error, install the new grub.cfg
-    mv -f ${grub_cfg}.new ${grub_cfg}
+    cat ${grub_cfg}.new > ${grub_cfg}
+    rm -f ${grub_cfg}.new
   fi
 fi
 
Signature · 1 line
2.21.0