aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 7bce122ae7..e6c6822cec 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -223,12 +223,11 @@ default_postinst() {
if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
. /lib/functions/system.sh
[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
- cd /etc/uci-defaults
- for i in $(grep -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"); do
- ( . "./$(basename $i)" ) && rm -f "$i"
- done
+ for i in $(sed -ne 's!^/etc/uci-defaults/!!p' "/usr/lib/opkg/info/${pkgname}.list"); do (
+ cd /etc/uci-defaults
+ [ -f "$i" ] && . "$i" && rm -f "$i"
+ ) done
uci commit
- cd $OLDPWD
fi
[ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null