From fd87a9d5bc3fe165d366059a648eadfbe30baf49 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 17 Mar 2019 20:55:08 +0100 Subject: upslak.sh: do not presume that people build overlayfs as a module The script will now only fail if you have zero modules in your tree. I presume (!) that this corner case will never occur. In any case, I will not support it. --- upslak.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upslak.sh b/upslak.sh index 128970a..f3ddb73 100644 --- a/upslak.sh +++ b/upslak.sh @@ -688,7 +688,7 @@ else else # Determine the new kernel version from a module, # rather than from a directory- or filenames: - KVER=$(strings ${KMODDIR}/kernel/fs/overlayfs/overlay.ko* |grep ^vermagic |cut -d= -f2 |cut -d' ' -f1) + KVER=$(strings $(find ${KMODDIR}/kernel/ -name "*.ko*" |head -1) |grep ^vermagic |cut -d= -f2 |cut -d' ' -f1) if [ -z "${KVER}" ]; then echo "*** Could not determine kernel version from the module directory" echo "*** (querying module kernel/fs/overlayfs/overlay.ko)!" -- cgit v1.2.3