]> git.ipfire.org Git - thirdparty/dracut-ng.git/commit
fix(dracut): protect existing output file against build errors 694/head
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Thu, 13 Mar 2025 16:03:21 +0000 (17:03 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 20 Apr 2025 10:43:51 +0000 (06:43 -0400)
commit39a765debe212407cce28e6d3a84a65e4efc1c6e
tree75e29b609a299dd4553a35587acd0caf58fdef77
parent42eafab80d835baed70963eacda86e674712b1b1
fix(dracut): protect existing output file against build errors

If dracut fails to build the initrd image or EFI binary for any reason (e.g., if
`cp` fails because there is no space left on the device), it removes the
existing output file before exiting, which may result in an unbootable system.
Instead of copying the initrd image directly to the output, copy it alongside it
to the same output directory, and if the copy succeeds, replace it.
dracut.sh