grub2: Don't delete grub2.cfg.old file we just copied
authorColin Walters <walters@verbum.org>
Wed, 27 Jan 2016 15:43:57 +0000 (10:43 -0500)
committerColin Walters <walters@verbum.org>
Wed, 27 Jan 2016 15:46:12 +0000 (10:46 -0500)
The original intention here was that we'd keey around a copy of the
file so that grub2 could eventually learn how to do atomic updates by
checking for a "fully written" marker in the *new* file, and if it
didn't exist, falling back to grub2.cfg.old.

I haven't yet proposed that upstream, but we might as well stop
deleting the file since it's useful as a backup at least.

Reported-by: Gatis Paeglis
src/libostree/ostree-bootloader-grub2.c

index 1f8991431fe9fdad13055b56acedef2f83eb06ad..42ed5acc9ea168ffbb22842d875b4bd04aa3082c 100644 (file)
@@ -388,8 +388,6 @@ rm -f ${grub_cfg}.new
       if (!g_file_copy (self->config_path_efi, config_path_efi_old,
                         G_FILE_COPY_OVERWRITE, cancellable, NULL, NULL, error))
         goto out;
-      if (!ot_gfile_ensure_unlinked (config_path_efi_old, cancellable, error))
-        goto out;
 
       /* NOTE: NON-ATOMIC REPLACEMENT; WE can't do anything else on FAT;
        * see https://bugzilla.gnome.org/show_bug.cgi?id=724246