Skip to content

Commit ab2e53c

Browse files
Marcel KolajaDaniel Kiper
Marcel Kolaja
authored and
Daniel Kiper
committed
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 <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Daniel Kiper <[email protected]>
1 parent fc085f7 commit ab2e53c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

util/grub-mkconfig.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ and /etc/grub.d/* files or please file a bug report with
287287
exit 1
288288
else
289289
# none of the children aborted with error, install the new grub.cfg
290-
mv -f ${grub_cfg}.new ${grub_cfg}
290+
cat ${grub_cfg}.new > ${grub_cfg}
291+
rm -f ${grub_cfg}.new
291292
fi
292293
fi
293294

0 commit comments

Comments
 (0)