systemctl: if kexec is missing, do not try to kexec

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-03-09 10:43:54 +01:00
parent df685d5784
commit c0d7321498
+3
View File
@@ -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.");