Kickstart Pre-Installation Script Can't Process Bash Pipe

Latest response

You can list out your block devices in your pre-execution script like this, /usr/bin/lsblk -fl However, if you attempt to pretty-print them with:

declare -i i=1
declare -a SOURCES
/usr/bin/lsblk -fl | \
while read d
echo $i: ${SOURCES[$i]}
let i=$i+1

you get nothing--even when redirecting output to the current virtual terminal which in my case was /dev/tty6, (after saying exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 chvt 6). This was to be the basis for interaction with the user to select a source disk.


what about a for-loop instead? for source in $(/usr/bin/lsblk -fl); do some action here; done

To my disappointment, i get the same result--no output on the tty for that section of code. :-(

Forgot to mention this is in RHEL 7 using Anaconda