From: Harald Hoyer Date: Wed, 27 Jun 2012 07:38:26 +0000 (+0200) Subject: dracut-functions.sh:inst_libdir_files() combine installs X-Git-Tag: 020~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c6565c81081307780bb0f7387ef81ef0bd06591;p=thirdparty%2Fdracut.git dracut-functions.sh:inst_libdir_files() combine installs first, search for all files, then call dracut_install only once --- diff --git a/dracut-functions.sh b/dracut-functions.sh index fd133b831..d53ec7b67 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -744,6 +744,7 @@ dracut_install() { # Install a located on a lib directory to the initramfs image # -n install matching files inst_libdir_file() { + local _files if [[ "$1" == "-n" ]]; then local _pattern=$2 shift 2 @@ -751,7 +752,7 @@ inst_libdir_file() { for _i in "$@"; do for _f in "$_dir"/$_i; do [[ "$_f" =~ $_pattern ]] || continue - [[ -e "$_f" ]] && dracut_install "$_f" + [[ -e "$_f" ]] && _files+="$_f " done done done @@ -759,11 +760,12 @@ inst_libdir_file() { for _dir in $libdirs; do for _i in "$@"; do for _f in "$_dir"/$_i; do - [[ -e "$_f" ]] && dracut_install "$_f" + [[ -e "$_f" ]] && _files+="$_f " done done done fi + [[ $_files ]] && dracut_install $_files }