grub2 confusion
Eric Blake
eblake at redhat.com
Thu Oct 6 22:32:33 UTC 2011
On 10/06/2011 03:04 PM, Michal Jaegermann wrote:
> On Thu, Oct 06, 2011 at 10:09:44PM +0200, Michael Schwendt wrote:
>>
>> grub2-mkconfig is just a brute-force shell script that ends with
>>
>> # none of the children aborted with error, install the new grub.cfg
>> mv -f ${grub_cfg}.new ${grub_cfg}
>>
>> so instead of not shipping an incompatible /etc/grub2.cfg symlink as
>> long as this tool obviously cannot handle the symlink, there are lame and
>> dubious attempts at defending the symlink.
>
> File a bug against grub2. If instead of
>
> mv -f ${grub_cfg}.new ${grub_cfg}
>
> you would have
>
> cat ${grub_cfg}.new> ${grub_cfg}; rm -f ${grub_cfg}.new
>
> you would not notice any troubles.
Umm, yes you would. That's not atomic, and risks leaving things in an
inconsistent state.
http://www.flamingspork.com/talks/2007/06/eat_my_data.odp
http://www.pixelbeat.org/docs/unix_file_replacement.html
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the test
mailing list