Skip to content

Commit c68e2b4

Browse files
committed
packaging: Use bootc container inspect
This is a nicer way to check for the kernel version. Signed-off-by: Colin Walters <walters@verbum.org>
1 parent aa2680f commit c68e2b4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

contrib/packaging/configure-rootfs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ROOTFS="${2:-}"
99
CONFIG_DIR="/usr/lib/bootc/install"
1010
mkdir -p "${CONFIG_DIR}"
1111

12+
kver=$(bootc container inspect --json | jq -re .kernel.version)
13+
1214
# Do we have an explicit build-time override? Then write it.
1315
if [ -n "$ROOTFS" ]; then
1416
cat > "${CONFIG_DIR}/80-rootfs-override.toml" <<EOF
@@ -24,7 +26,7 @@ else
2426
fs=
2527
case "${VARIANT}" in
2628
composefs*)
27-
btrfs=$(grep -qEe '^CONFIG_BTRFS_FS' /usr/lib/modules/*/config && echo btrfs || true)
29+
btrfs=$(grep -qEe '^CONFIG_BTRFS_FS' /usr/lib/modules/${kver}/config && echo btrfs || true)
2830
fs=${btrfs:-ext4}
2931
;;
3032
*)

0 commit comments

Comments
 (0)