aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-12-01 16:15:13 +0000
committerJohn Crispin <blogic@openwrt.org>2014-12-01 16:15:13 +0000
commit894af53f0084d8a38b0e42edf061e54b09921db7 (patch)
treeae7ec584d98bd3da81b9b7d5f5987c95117dbe5c /package/base-files
parent9905c97216318e8a313863154c5842e2e6090e44 (diff)
downloadupstream-894af53f0084d8a38b0e42edf061e54b09921db7.tar.gz
upstream-894af53f0084d8a38b0e42edf061e54b09921db7.tar.bz2
upstream-894af53f0084d8a38b0e42edf061e54b09921db7.zip
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 <christian.schoenebeck@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43472 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/lib/functions.sh6
2 files changed, 5 insertions, 3 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index aeba973879..3c453b54aa 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/version.mk
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
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index d53be3edfe..9d98fb0fbe 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -173,7 +173,6 @@ default_prerm() {
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 @@ default_postinst() {
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 @@ default_postinst() {
$i start
}
done
- [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null
return 0
}