diff options
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 4ec0cac332..cf1fa4874a 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -231,6 +231,17 @@ default_postinst() { cd $OLDPWD fi + 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 + uci commit + cd $OLDPWD + fi + [ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null if [ "$PKG_UPGRADE" != "1" ]; then |