mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix sysmerge delayed upgrade bricking system.
It ran update-initrd before removing /sysmerge, which caused the initrd to attempt another upgrade, but there was no image in /sysmerge.
This commit is contained in:
parent
f52fb3202c
commit
478468a04e
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue