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
This commit is contained in:
Ben Nemec 2015-04-08 15:26:06 -05:00
parent ffe825113e
commit 9c27fae1e4

View File

@ -19,10 +19,7 @@ install() {
# TODO(bnemec): At some point this will need to be extended to support # 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. # Python 3, but for the moment we aren't using that anyway.
inst /usr/bin/python inst /usr/bin/python
for i in $(find /usr/lib64/python2.7/ -type f); do while IFS='' read -r -d '' i; do
inst $i inst "$i"
done done < <(find /usr/lib64/python2.7/ /usr/lib/python2.7/ -type f -print0)
for i in $(find /usr/lib/python2.7/ -type f); do
inst $i
done
} }