Skip to content

Commit fe62932

Browse files
committed
[fix] : fix path to kernel modules directory in other distro
1 parent e745fb7 commit fe62932

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/docker-build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,15 @@ while (( $# > 0 )); do
114114
done
115115
# End parse options
116116

117+
if [[ -d /usr/lib/modules/$(uname -r) ]]; then
118+
KMODS_DIR=/usr/lib/modules
119+
else
120+
KMODS_DIR=/lib/modules
121+
fi
122+
117123
DOCKER_RUN_OPTS=()
118124
DOCKER_RUN_OPTS+=(-v "${DIST_DIR}:/alterlinux/out")
119-
DOCKER_RUN_OPTS+=(-v "/usr/lib/modules:/usr/lib/modules:ro")
125+
DOCKER_RUN_OPTS+=(-v "${KMODS_DIR}:/usr/lib/modules:ro")
120126
[[ "x${EXTERNAL_WORK_DIR}" != "x" ]] && \
121127
DOCKER_RUN_OPTS+=(-v "${EXTERNAL_WORK_DIR}:/alterlinux/work")
122128
[[ "x${NO_SHARE_PKG}" != "xTrue" ]] && {

0 commit comments

Comments
 (0)