bootctl: move arg_touch_variables checkers to bootctl-util.c
No functional change, just refactoring.
This commit is contained in:
@@ -229,29 +229,6 @@ static int print_loader_or_stub_path(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool touch_variables(void) {
|
||||
/* If we run in a container or on a non-EFI system, automatically turn off EFI file system access,
|
||||
* unless explicitly overridden. */
|
||||
|
||||
if (arg_touch_variables >= 0)
|
||||
return arg_touch_variables;
|
||||
|
||||
if (arg_root) {
|
||||
log_once(LOG_NOTICE,
|
||||
"Operating on %s, skipping EFI variable modifications.",
|
||||
arg_image ? "image" : "root directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_efi_boot()) { /* NB: this internally checks if we run in a container */
|
||||
log_once(LOG_NOTICE,
|
||||
"Not booted with EFI or running in a container, skipping EFI variable modifications.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
GracefulMode arg_graceful(void) {
|
||||
static bool chroot_checked = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user