From bdd36c003d9c4c4ca89c92be504615378f61513c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 23 Oct 2023 11:18:35 +0200 Subject: kernel-install: Add --json option for inspect verb In mkosi, we can't use kernel-install directly but we do want to mimick its behavior as much as possible. Let's make that easier by making it easy to fetch data from kernel-install as JSON. To get all the necessary data, we extend the inspect verb to also allow passing in a kernel version and initrds, to mimick the "add" verb. The kernel version is used to determine the "Entry Directory", and in absence of auto-detection of kernel version in kernel-install we have to allow users to pass it. We also add --no-pager while we're at it. --- man/kernel-install.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'man') diff --git a/man/kernel-install.xml b/man/kernel-install.xml index 64137ce61c..822c289259 100644 --- a/man/kernel-install.xml +++ b/man/kernel-install.xml @@ -40,7 +40,9 @@ kernel-install OPTIONS inspect + KERNEL-VERSION KERNEL-IMAGE + INITRD-FILE @@ -176,11 +178,14 @@ - inspect [KERNEL-IMAGE] + + inspect [[KERNEL-VERSION] KERNEL-IMAGE] [INITRD-FILE ...] + Shows the various paths and parameters configured or auto-detected. In particular shows the values of the various $KERNEL_INSTALL_* environment variables listed - below. + below. The option can be used to get the output of this verb as a JSON + object. @@ -298,6 +303,8 @@ + + -- cgit v1.2.3