summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2023-05-05 06:22:57 -0400
committerEmanuele Giuseppe Esposito <eesposit@redhat.com>2023-05-10 09:18:25 -0400
commite673c5c2d904d821719b2d21746ef91482acf8b4 (patch)
tree3cf28e7637057ef0e110123e25368eeeccb991c9
parent210cb8d690cf585b7cd162efbdc563a5ae6921ff (diff)
downloadsystemd-e673c5c2d904d821719b2d21746ef91482acf8b4.tar.gz
ukify: typo in doc and print when package is missing
If a package is missing, a subprocess is started with None as command argument. Error raised by subprocess is therefore not helpful at all to understand what needs to be done to fix that error. Also fix doc since systemd-stub will look for .cmdline files, and not .cmdline.efi files. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
-rw-r--r--man/ukify.xml2
-rwxr-xr-xsrc/ukify/ukify.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/man/ukify.xml b/man/ukify.xml
index 6aa136298d..cc711190fa 100644
--- a/man/ukify.xml
+++ b/man/ukify.xml
@@ -435,7 +435,7 @@ Phases=enter-initrd:leave-initrd
--secureboot-private-key=sb.key \
--secureboot-certificate=sb.cert \
--cmdline='debug' \
- --output=debug.cmdline.efi
+ --output=debug.cmdline
</programlisting>
<para>This creates a signed PE binary that contains the additional kernel command line parameter
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py
index 7e9c7cc9ae..9db84afdbb 100755
--- a/src/ukify/ukify.py
+++ b/src/ukify/ukify.py
@@ -353,8 +353,10 @@ def find_tool(name, fallback=None, opts=None):
if shutil.which(name) is not None:
return name
- return fallback
+ if fallback is None:
+ print(f"Tool {name} not installed!")
+ return fallback
def combine_signatures(pcrsigs):
combined = collections.defaultdict(list)