Skip to content

Commit

Permalink
Merge pull request #3157 from cgwalters/syslinux-bootprefix-fix
Browse files Browse the repository at this point in the history
syslinux: Avoid double `/boot` if bootprefix is enabled
  • Loading branch information
cgwalters authored Feb 6, 2024
2 parents 7404131 + a05dbb3 commit 9b64443
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/libostree/ostree-bootloader-syslinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "config.h"

#include "ostree-bootloader-syslinux.h"
#include "ostree-repo-private.h"
#include "ostree-sysroot-private.h"
#include "otutil.h"

Expand Down Expand Up @@ -84,15 +85,16 @@ append_config_from_loader_entries (OstreeBootloaderSyslinux *self, gboolean rege
val = ostree_bootconfig_parser_get (config, "linux");
if (!val)
return glnx_throw (error, "No \"linux\" key in bootloader config");
g_ptr_array_add (new_lines, g_strdup_printf ("\tKERNEL /boot%s", val));
const char *prefix = self->sysroot->repo->enable_bootprefix ? "" : "/boot";
g_ptr_array_add (new_lines, g_strdup_printf ("\tKERNEL %s%s", prefix, val));

val = ostree_bootconfig_parser_get (config, "initrd");
if (val)
g_ptr_array_add (new_lines, g_strdup_printf ("\tINITRD /boot%s", val));
g_ptr_array_add (new_lines, g_strdup_printf ("\tINITRD %s%s", prefix, val));

val = ostree_bootconfig_parser_get (config, "devicetree");
if (val)
g_ptr_array_add (new_lines, g_strdup_printf ("\tDEVICETREE /boot%s", val));
g_ptr_array_add (new_lines, g_strdup_printf ("\tDEVICETREE %s%s", prefix, val));

val = ostree_bootconfig_parser_get (config, "options");
if (val)
Expand Down

0 comments on commit 9b64443

Please sign in to comment.