summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-10-06 05:55:35 +0000
committerJohn Crispin <john@openwrt.org>2014-10-06 05:55:35 +0000
commitf9cccd2c14cddcddfa45968bcd2a42b4fec29241 (patch)
treee428e59adc8b3b9be244779831bd78655d571904 /package/base-files
parente263cd27ee08799a0177f27120e269cb0176ebe0 (diff)
downloadmtk-20170518-f9cccd2c14cddcddfa45968bcd2a42b4fec29241.zip
mtk-20170518-f9cccd2c14cddcddfa45968bcd2a42b4fec29241.tar.gz
mtk-20170518-f9cccd2c14cddcddfa45968bcd2a42b4fec29241.tar.bz2
base-files: make postinst script run inside a subshell
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42800
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index fafb7a3..7f14822 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -173,7 +173,7 @@ 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
+ [ -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