Author: blogic Date: 2014-12-01 17:15:13 +0100 (Mon, 01 Dec 2014) New Revision: 43472
Modified: trunk/package/base-files/Makefile trunk/package/base-files/files/lib/functions.sh Log: base-files: default_postinst() - create user:group first (resend) create user:group before running postinst-pkg. the postinst hook might require the user:group to already exist. Signed-off-by: Christian Schoenebeck <[email protected]> Modified: trunk/package/base-files/Makefile =================================================================== --- trunk/package/base-files/Makefile 2014-12-01 16:15:08 UTC (rev 43471) +++ trunk/package/base-files/Makefile 2014-12-01 16:15:13 UTC (rev 43472) @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files -PKG_RELEASE:=156 +PKG_RELEASE:=157 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ PKG_BUILD_DEPENDS:=opkg/host Modified: trunk/package/base-files/files/lib/functions.sh =================================================================== --- trunk/package/base-files/files/lib/functions.sh 2014-12-01 16:15:08 UTC (rev 43471) +++ trunk/package/base-files/files/lib/functions.sh 2014-12-01 16:15:13 UTC (rev 43472) @@ -173,7 +173,6 @@ default_postinst() { local name rusers name=$(echo $(basename $1) | cut -d. -f1) - [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.postinst-pkg ) rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.control) [ -n "$rusers" ] && { local user group uid gid @@ -212,6 +211,10 @@ done done } + + [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.postinst-pkg ) + [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null + [ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${name}.list | grep "^/etc/init.d/"`; do [ -n "${IPKG_INSTROOT}" ] && $(which bash) ${IPKG_INSTROOT}/etc/rc.common ${IPKG_INSTROOT}$i enable; \ [ -n "${IPKG_INSTROOT}" ] || { @@ -219,7 +222,6 @@ $i start } done - [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null return 0 } _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
