From 9c27fae1e4c73e97f20dae030afba717482f042a Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Wed, 8 Apr 2015 15:26:06 -0500 Subject: [PATCH] Clean up targetcli ramdisk installation The targetcli element was triggering a bunch of errors from dracut when we installed all of Python. It turns out this is because there were filenames with spaces in the find output and the loop didn't handle that properly. This switches to a while loop that can handle odd filenames. Change-Id: Iacbf16f26f2bc9991840250dc8ae7990db54d811 --- .../deploy-targetcli/extra-data.d/module/module-setup.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/elements/deploy-targetcli/extra-data.d/module/module-setup.sh b/elements/deploy-targetcli/extra-data.d/module/module-setup.sh index 36786759..6c32668f 100755 --- a/elements/deploy-targetcli/extra-data.d/module/module-setup.sh +++ b/elements/deploy-targetcli/extra-data.d/module/module-setup.sh @@ -19,10 +19,7 @@ install() { # TODO(bnemec): At some point this will need to be extended to support # Python 3, but for the moment we aren't using that anyway. inst /usr/bin/python - for i in $(find /usr/lib64/python2.7/ -type f); do - inst $i - done - for i in $(find /usr/lib/python2.7/ -type f); do - inst $i - done + while IFS='' read -r -d '' i; do + inst "$i" + done < <(find /usr/lib64/python2.7/ /usr/lib/python2.7/ -type f -print0) }