If the /etc/rpm-postinsts/ directory was empty, the following error
would occur at system startup.
ERROR: postinst /etc/rpm-postinsts/* failed
This patch fixes this issue.
[YOCTO #3767]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
i=\$i
cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
#!/bin/sh
-for i in /etc/rpm-postinsts/*; do
+for i in `ls /etc/rpm-postinsts/`; do
+ i=/etc/rpm-postinsts/$i
echo "Running postinst $i..."
if [ -f $i ] && $i; then
rm $i