base-files: improve consistency of relative paths in kernel hooks

This commit is contained in:
Andrew J. Hesford 2020-08-05 12:13:08 -04:00
parent 0194f95096
commit 8f4c05bf76
2 changed files with 4 additions and 2 deletions

View File

@ -39,10 +39,12 @@ list_kernels() {
run_hooks() { run_hooks() {
dir="$1" dir="$1"
kver="$2" kver="$2"
for d in /etc/kernel.d/"${dir}"/*; do for d in /etc/kernel.d/"${dir}"/*; do
[ -x "$d" ] || continue [ -x "$d" ] || continue
printf "Running %s kernel hook: %s...\n" "$dir" "${d##*/}" printf "Running %s kernel hook: %s...\n" "$dir" "${d##*/}"
"$d" kernel "$kver" # Hooks assume they run from the root
(cd / && ROOTDIR=. "$d" kernel "$kver")
done done
} }

View File

@ -1,7 +1,7 @@
# Template file for 'base-files' # Template file for 'base-files'
pkgname=base-files pkgname=base-files
version=0.141 version=0.141
revision=1 revision=2
bootstrap=yes bootstrap=yes
depends="xbps-triggers" depends="xbps-triggers"
short_desc="Void Linux base system files" short_desc="Void Linux base system files"