cdist-contrib/type/__jool/explorer/alpine-kernel-modules

20 lines
411 B
Bash
Executable File

#!/bin/sh
# Explorer for the __jool type to determine if we need the -virt or the -lts modules.
[ "$(sh -e "${__explorer:?}"/os)" = 'alpine' ] || exit 0
case $(uname -r) in
*-virt)
printf "jool-modules-virt"
;;
*-lts)
printf "jool-modules-lts"
;;
*)
cat <<- EOF >&2
Incompatible kernel version found - could not install jool kernel
modules. Please use one of linux-lts or linux-virt.
EOF
exit 1
esac