mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
packaging: Use bootc container inspect
This is a nicer way to check for the kernel version. Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
@@ -9,6 +9,8 @@ ROOTFS="${2:-}"
|
||||
CONFIG_DIR="/usr/lib/bootc/install"
|
||||
mkdir -p "${CONFIG_DIR}"
|
||||
|
||||
kver=$(bootc container inspect --json | jq -re .kernel.version)
|
||||
|
||||
# Do we have an explicit build-time override? Then write it.
|
||||
if [ -n "$ROOTFS" ]; then
|
||||
cat > "${CONFIG_DIR}/80-rootfs-override.toml" <<EOF
|
||||
@@ -24,7 +26,7 @@ else
|
||||
fs=
|
||||
case "${VARIANT}" in
|
||||
composefs*)
|
||||
btrfs=$(grep -qEe '^CONFIG_BTRFS_FS' /usr/lib/modules/*/config && echo btrfs || true)
|
||||
btrfs=$(grep -qEe '^CONFIG_BTRFS_FS' /usr/lib/modules/${kver}/config && echo btrfs || true)
|
||||
fs=${btrfs:-ext4}
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user