grub-mkconfig: Honor a symlink when generating configuration by grub-mkconfig

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

Signed-off-by: Marcel Kolaja <mkolaja@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Marcel Kolaja authored and Daniel Kiper committed 2019-09-23 13:17:15 +02:00
1 parent fc085f7f18
commit ab2e53c8a1
1 file changed
+2 -1
+2 -1
View File
@@ -287,7 +287,8 @@ and /etc/grub.d/* files or please file a bug report with
exit 1 exit 1
else else
# none of the children aborted with error, install the new grub.cfg # 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
fi fi