<xi:include href="standard-options.xml" xpointer="esp-path"/>
<xi:include href="standard-options.xml" xpointer="boot-path"/>
+ <varlistentry>
+ <term><option>--make-entry-directory=yes|no|auto</option></term>
+ <listitem>
+ <para>Controls creation and deletion of the
+ <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader Specification</ulink>
+ Type #1 entry directory on the file system containing resources such as kernel and initrd images
+ during <option>add</option> and <option>remove</option>, respectively. The directory is named after
+ the entry token, and is placed immediately below the boot root directory. When
+ <literal>auto</literal>, the directory is created or removed only when the install layout is
+ <literal>bls</literal>. Defaults to <literal>auto</literal>.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>
static bool arg_verbose = false;
static char *arg_esp_path = NULL;
static char *arg_xbootldr_path = NULL;
+static int arg_make_entry_directory = -1; /* tristate */
STATIC_DESTRUCTOR_REGISTER(arg_esp_path, freep);
STATIC_DESTRUCTOR_REGISTER(arg_xbootldr_path, freep);
/* Compatibility with earlier versions that used the presence of $BOOT_ROOT/$ENTRY_TOKEN to signal to
* 00-entry-directory to create $ENTRY_DIR to serve as the indication to use or to not use the BLS */
- return c->layout == LAYOUT_BLS;
+ if (arg_make_entry_directory < 0)
+ return c->layout == LAYOUT_BLS;
+
+ return arg_make_entry_directory;
}
static int context_make_entry_dir(Context *c) {
" -v --verbose Increase verbosity\n"
" --esp-path=PATH Path to the EFI System Partition (ESP)\n"
" --boot-path=PATH Path to the $BOOT partition\n"
+ " --make-entry-directory=yes|no|auto\n"
+ " Create $BOOT/ENTRY-TOKEN/ directory\n"
"\nSee the %4$s for details.\n",
program_invocation_short_name,
ansi_highlight(),
ARG_VERSION = 0x100,
ARG_ESP_PATH,
ARG_BOOT_PATH,
+ ARG_MAKE_ENTRY_DIRECTORY,
};
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "verbose", no_argument, NULL, 'v' },
{ "esp-path", required_argument, NULL, ARG_ESP_PATH },
{ "boot-path", required_argument, NULL, ARG_BOOT_PATH },
+ { "make-entry-directory", required_argument, NULL, ARG_MAKE_ENTRY_DIRECTORY },
{}
};
int t, r;
return log_oom();
break;
+ case ARG_MAKE_ENTRY_DIRECTORY:
+ if (streq(optarg, "auto"))
+ arg_make_entry_directory = -1;
+ else {
+ r = parse_boolean_argument("--make-entry-directory=", optarg, NULL);
+ if (r < 0)
+ return r;
+
+ arg_make_entry_directory = r;
+ }
+ break;
+
case '?':
return -EINVAL;