Commit 73bab906 authored by Vitaly Lipatov's avatar Vitaly Lipatov

workaround for /lib/modules on ALT and do list uniq

parent 37d0f13e
......@@ -47,7 +47,8 @@ check_build_module()
echo "====================================================================="
echo "Check build etercifs module for all found kernels"
BUILTLIST=
for KERNSRC in $(list_kernel_headers) ; do
# Note: we can skip any duplicates here
for KERNSRC in $(list_kernel_headers | xargs -n1 realpath | sort -u) ; do
echo "---------------------------------------------------------------------"
detect_kernel
if [ -z "$KERNELVERSION" ] ; then
......
......@@ -100,7 +100,10 @@ create_builddir()
list_kernel_headers()
{
local LM
for LM in `ls -d /lib/modules/*/build` ; do
local LMP="/lib/modules/*/build"
# forbidden on ALT
test -x /lib/modules || LMP="/usr/src/linux-*"
for LM in `ls -d $LMP` ; do
[ -r "$LM" ] || continue
[ -L $(readlink $LM) ] && continue
[ -f $LM/.config ] || continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment