Skip to content

Commit 03a3c48

Browse files
MichaIngorazioedoardo
authored andcommitted
fix(install): consider /lib and /usr/lib both as valid module paths
Since Debian Trixie, /usr/lib/modules is correctly considered as valid kernel module path, but 3rd party packages can fomally still ship modules below /lib/modules, or below /usr/lib/modules as well on older Debian versions. Since usrmerge, both are effectively the same directory anyway. Hence always consider both paths. Signed-off-by: MichaIng <[email protected]>
1 parent 5b689e8 commit 03a3c48

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

auto_install/install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,9 @@ preconfigurePackages() {
661661
# the wireguard module so it'll appear builtin from the container's point of view.
662662
WIREGUARD_BUILTIN=0
663663

664-
if [[ "${OSCN}" == "trixie" ]]; then
665-
module_search_path='/usr/lib/modules/*/wireguard.ko*'
666-
else
667-
module_search_path='/lib/modules/*/wireguard.ko*'
668-
fi
669-
670664
if [[ "${PKG_MANAGER}" == 'apt-get' ]]; then
671-
if dpkg-query -S "${module_search_path}" &> /dev/null \
665+
if dpkg-query -S '/lib/modules/*/wireguard.ko*' &> /dev/null \
666+
|| dpkg-query -S '/usr/lib/modules/*/wireguard.ko*' &> /dev/null \
672667
|| modinfo wireguard 2> /dev/null \
673668
| grep -q '^filename:[[:blank:]]*(builtin)$' \
674669
|| lsmod | grep -q '^wireguard'; then

0 commit comments

Comments
 (0)