REQUIRED_PROGS=(
"${REQUIRED_PROGS[@]}"
sfdisk
)

PROGS=(
"${PROGS[@]}"
bootlist
pseries_platform
nvram
ofpathname
bc
agetty
)

# If not specified have no firmware files in the recovery system on Linux-ppc64le architecture
# except ppc64le Linux is run in BareMetal Mode (PowerNV) where firmware files are needed
# cf. https://github.com/rear/rear/issues/1142#issuecomment-276050900
# test for "${name[*]}" because FIRMWARE_FILES is an array and the test should succeed
# when there is any non-empty array member, (not necessarily the first one):
if [[ $(awk '/platform/ {print $NF}' < /proc/cpuinfo) != PowerNV ]] ; then
    # No firmware files when ppc64le Linux is not run in BareMetal Mode (PowerNV):
    test "${FIRMWARE_FILES[*]}" || FIRMWARE_FILES=( 'no' )
fi
