There maybe no rpm postinst script (e.g., core-image-minimal), then the
"*" is not expanded, and there would be error:
head: cannot open `rpm-postinsts/*' for reading: No such file or directory
Check whether it exists or not will fix the problem.
[YOCTO #3172]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
# Report delayed package scriptlets
for i in ${IMAGE_ROOTFS}/etc/rpm-postinsts/*; do
- echo "Delayed package scriptlet: `head -n 3 $i | tail -n 1`"
+ if [ -f $i ]; then
+ echo "Delayed package scriptlet: `head -n 3 $i | tail -n 1`"
+ fi
done
install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d