From: Zbigniew Jędrzejewski-Szmek Date: Thu, 8 Mar 2018 10:00:26 +0000 (+0100) Subject: systemctl: if kexec is missing, do not try to kexec X-Git-Tag: v239~532^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0d73214986ca006949b86b74c583878a562be53;p=thirdparty%2Fsystemd.git systemctl: if kexec is missing, do not try to kexec --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 3be01321b6c..dfc9630f55d 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3483,6 +3483,9 @@ static int load_kexec_kernel(void) { return 0; } + if (access(KEXEC, X_OK) < 0) + return log_error_errno(errno, KEXEC" is not available: %m"); + r = find_esp_and_warn(arg_esp_path, false, &where, NULL, NULL, NULL, NULL); if (r == -ENOKEY) /* find_esp_and_warn() doesn't warn about this case */ return log_error_errno(r, "Cannot find the ESP partition mount point.");