diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2016-12-16 18:14:47 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-11 15:34:54 -0500 |
commit | db1e2bfc4f049261ae2d407568ff39569b36d98c (patch) | |
tree | 8d80339bfdfd818e4a8134e9437e02b6152c84ac | |
parent | 374e69225215aa25ea67b166ec4b61ad628d5021 (diff) |
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.
-rw-r--r-- | src/kernel-install/kernel-install | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index a95b9717f0..c7d9f4eea9 100644 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -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) |