mirror of
https://github.com/systemd/systemd.git
synced 2025-01-06 17:18:12 +03:00
kernel-install: avoid process substitution
bash implements process substitution using /dev/fd/N (this is documented in man bash). We'd like kernel-install to work in chrooted RPM scriptlets without /dev. We can use here-strings instead. bash uses temporary files to implement those.
This commit is contained in:
parent
374e692252
commit
db1e2bfc4f
@ -34,7 +34,7 @@ dropindirs_sort()
|
||||
local -a files
|
||||
local f d i
|
||||
|
||||
readarray -t files < <(
|
||||
readarray -t files <<<"$(
|
||||
for d in "$@"; do
|
||||
for i in "$d/"*"$suffix"; do
|
||||
if [[ -e "$i" ]]; then
|
||||
@ -42,7 +42,7 @@ dropindirs_sort()
|
||||
fi
|
||||
done
|
||||
done | sort -Vu
|
||||
)
|
||||
)"
|
||||
|
||||
for f in "${files[@]}"; do
|
||||
for d in "$@"; do
|
||||
@ -104,11 +104,11 @@ fi
|
||||
|
||||
ret=0
|
||||
|
||||
readarray -t PLUGINS < <(
|
||||
readarray -t PLUGINS <<<"$(
|
||||
dropindirs_sort ".install" \
|
||||
"/etc/kernel/install.d" \
|
||||
"/usr/lib/kernel/install.d"
|
||||
)
|
||||
)"
|
||||
|
||||
case $COMMAND in
|
||||
add)
|
||||
|
Loading…
Reference in New Issue
Block a user