]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: if kexec is missing, do not try to kexec
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Mar 2018 10:00:26 +0000 (11:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 9 Mar 2018 09:43:54 +0000 (10:43 +0100)
src/systemctl/systemctl.c

index 3be01321b6cbad10b3fca9b0a1f94bfb5bd42017..dfc9630f55de08bd36b067352c56e50fdd634892 100644 (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.");