testsuite: refactor kernel config search

Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st>
This commit is contained in:
Asbjørn Sloth Tønnesen 2017-02-15 21:26:41 +00:00 committed by Stephen Hemminger
parent afdc1fed24
commit 3064a44c69
1 changed files with 3 additions and 2 deletions

View File

@ -17,8 +17,9 @@ ifneq (,$(wildcard /proc/config.gz))
KENV := $(shell cat /proc/config.gz | gunzip | grep ^CONFIG)
else
KVER := $(shell uname -r)
KCPATH := /lib/modules/${KVER}/config
ifneq (,$(wildcard ${KCPATH}))
KCPATHS := /lib/modules/$(KVER)/config
KCPATH := $(firstword $(wildcard $(KCPATHS)))
ifneq (,$(KCPATH))
KENV := $(shell cat ${KCPATH} | grep ^CONFIG)
endif
endif