mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
bootctl: make sure bootctl --image= works on image with /usr/ but without / (#36727)
``` Let's make sure we can use the tool on ParticleOS images. They have no root fs by default (until they are instantiated), but always have /usr/. Hence add DISSECT_IMAGE_USR_NO_ROOT which has the desired effect. ```
This commit is contained in:
commit
cca655dcbf
@ -370,7 +370,13 @@ int verb_status(int argc, char *argv[], void *userdata) {
|
||||
|
||||
pager_open(arg_pager_flags);
|
||||
|
||||
if (!arg_root && is_efi_boot()) {
|
||||
if (arg_root)
|
||||
log_debug("Skipping 'System' section, operating offline.");
|
||||
else if (!is_efi_boot())
|
||||
printf("%sSystem:%s\n"
|
||||
"Not booted with EFI\n\n",
|
||||
ansi_underline(), ansi_normal());
|
||||
else {
|
||||
static const struct {
|
||||
uint64_t flag;
|
||||
const char *name;
|
||||
@ -567,10 +573,7 @@ int verb_status(int argc, char *argv[], void *userdata) {
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
} else
|
||||
printf("%sSystem:%s\n"
|
||||
"Not booted with EFI\n\n",
|
||||
ansi_underline(), ansi_normal());
|
||||
}
|
||||
|
||||
if (arg_esp_path)
|
||||
RET_GATHER(r, status_binaries(arg_esp_path, esp_uuid));
|
||||
|
@ -718,6 +718,7 @@ static int run(int argc, char *argv[]) {
|
||||
arg_image,
|
||||
arg_image_policy,
|
||||
DISSECT_IMAGE_GENERIC_ROOT |
|
||||
DISSECT_IMAGE_USR_NO_ROOT |
|
||||
DISSECT_IMAGE_RELAX_VAR_CHECK |
|
||||
DISSECT_IMAGE_ALLOW_USERSPACE_VERITY,
|
||||
&mounted_dir,
|
||||
|
Loading…
x
Reference in New Issue
Block a user