main/busybox: trigger on /usr/lib/modules

This commit is contained in:
Clayton Craft 2024-09-09 13:21:48 -07:00 committed by Natanael Copa
parent deb0795e71
commit 79b94adf1b
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=busybox
pkgver=1.36.1
pkgrel=31
pkgrel=32
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url="https://busybox.net/"
arch="all"
@ -33,7 +33,7 @@ subpackages="
"
options="suid net" # net needed for check()
replaces="busybox-initscripts" # move of default.script
triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*"
triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*:/usr/lib/modules/*"
_openrc_files="acpid.initd
crond.confd crond.initd

View file

@ -4,12 +4,12 @@ do_bb_install=
for i in "$@"; do
case "$i" in
/lib/modules/*)
/lib/modules/* | /usr/lib/modules/*)
# don't run busybox depmod if we have kmod installed
# we dont need to run it twice.
target=$(readlink -f "$(command -v depmod || true)")
if [ -d "$i" ] && [ "$target" = "/bin/busybox" ]; then
/bin/busybox depmod ${i#/lib/modules/}
/bin/busybox depmod ${i#*/lib/modules/}
fi
;;
*) do_bb_install=yes;;