@@ -196,8 +196,13 @@ $(_endef)
( \
echo "#!/bin/sh"; \
echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
+ echo "pkgname=\"\$$$$(basename \$$$${0%.*})\""; \
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
- echo "default_postinst \$$$$0 \$$$$@"; \
+ echo "if type default_postinst > /dev/null; then"; \
+ echo " default_postinst \$$$$0 \$$$$@ || true"; \
+ echo "elif [ -f \"\$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${pkgname}.postinst-pkg\" ]; then"; \
+ echo " . \"\$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${pkgname}.postinst-pkg\""; \
+ echo "fi"; \
) > postinst; \
( \
echo "#!/bin/sh"; \
Currently all package postinst scripts are saved as postinst-pkg and interpreted by script in base-files. Thus those don't work if you have old base-files. Updating generating script to make it work even with old base-files. Signed-off-by: Michal Hrusecky <Michal.Hrusecky@nic.cz> --- include/package-ipkg.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)