From: Harald Hoyer Date: Fri, 19 Jul 2013 07:34:04 +0000 (+0200) Subject: dracut-functions.sh: only wait for the last pid spawned X-Git-Tag: 031~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c4bfd685adfe67c58d07015887b6d04189f0fd0;p=thirdparty%2Fdracut.git dracut-functions.sh: only wait for the last pid spawned --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 561edb3cf..2676b45aa 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1455,6 +1455,7 @@ for_each_kmod_dep() { dracut_kernel_post() { local _moddirname=${srcmods%%/lib/modules/*} + local _pid if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then xargs -r modprobe -a ${_moddirname+-d ${_moddirname}/} \ @@ -1478,6 +1479,7 @@ dracut_kernel_post() { done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" fi ) & + while read a ; do _pid=$a;done < <(jobs -p) if [[ $DRACUT_INSTALL ]]; then xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ @@ -1497,7 +1499,7 @@ dracut_kernel_post() { done fi - wait + wait $_pid fi for _f in modules.builtin.bin modules.builtin; do