Merge pull request #2149 from stb-tester/boot-self-symlink
sysroot: Support /boot on root or as seperate filesystem for syslinux and u-boot
This commit is contained in:
4 files changed
+55
-26
No files matched your search
@@ -1994,6 +1994,12 @@ prepare_new_bootloader_link (OstreeSysroot *sysroot,
|
||||
g_assert ((current_bootversion == 0 && new_bootversion == 1) ||
|
||||
(current_bootversion == 1 && new_bootversion == 0));
|
||||
|
||||
/* This allows us to support both /boot on a seperate filesystem to / as well
|
||||
* as on the same filesystem. */
|
||||
if (TEMP_FAILURE_RETRY (symlinkat (".", sysroot->sysroot_fd, "boot/boot")) < 0)
|
||||
if (errno != EEXIST)
|
||||
return glnx_throw_errno_prefix (error, "symlinkat");
|
||||
|
||||
g_autofree char *new_target = g_strdup_printf ("loader.%d", new_bootversion);
|
||||
|
||||
/* We shouldn't actually need to replace but it's easier to reuse
|
||||
|
||||
Reference in new issue
Block a user