diff --git a/sysinstall/sysmerge.c b/sysinstall/sysmerge.c index a0d64e4d..d3110897 100644 --- a/sysinstall/sysmerge.c +++ b/sysinstall/sysmerge.c @@ -227,6 +227,13 @@ int main(int argc, char* argv[]) return 0; } + if ( booting ) + { + unlink("/boot/sortix.bin.sysmerge.orig"); + unlink("/boot/sortix.initrd.sysmerge.orig"); + execute((const char*[]) { "rm", "-rf", "/sysmerge", NULL }, ""); + } + if ( !wait && access_or_die("/etc/fstab", F_OK) == 0 ) { printf(" - Creating initrd...\n"); @@ -247,13 +254,6 @@ int main(int argc, char* argv[]) } } - if ( booting ) - { - unlink("/boot/sortix.bin.sysmerge.orig"); - unlink("/boot/sortix.initrd.sysmerge.orig"); - execute((const char*[]) { "rm", "-rf", "/sysmerge", NULL }, ""); - } - printf("Successfully upgraded to %s.\n", new_release.pretty_name); return 0;