bootctl: replace --no-variables by --variables=BOOL

I think the current behaviour of not doing EFI variables when we are run
in a container makes a ton of sense, but in some cases it's useful to
do EFI var setup even when a set of namespaces is set up for us, for
example to recover a hosed installation from a rescue disk.

While we are at it, let's remove some duplicate checks, and
systematically output information why we skip various operations.

Fixes: #36174 #35005
This commit is contained in:
Lennart Poettering
2025-04-16 13:39:12 +02:00
parent 53628612b7
commit bbeeea4362
6 changed files with 71 additions and 60 deletions
+3 -1
View File
@@ -20,7 +20,7 @@ extern char *arg_xbootldr_path;
extern bool arg_print_esp_path;
extern bool arg_print_dollar_boot_path;
extern unsigned arg_print_root_device;
extern bool arg_touch_variables;
extern int arg_touch_variables;
extern bool arg_install_random_seed;
extern PagerFlags arg_pager_flags;
extern bool arg_graceful;
@@ -54,3 +54,5 @@ static inline const char* arg_dollar_boot_path(void) {
int acquire_esp(int unprivileged_mode, bool graceful, uint32_t *ret_part, uint64_t *ret_pstart, uint64_t *ret_psize, sd_id128_t *ret_uuid, dev_t *ret_devid);
int acquire_xbootldr(int unprivileged_mode, sd_id128_t *ret_uuid, dev_t *ret_devid);
bool touch_variables(void);