base-files: enable presence of uci when IPKG_INSTROOT is set
authorYousong Zhou <yszhou4tech@gmail.com>
Sat, 4 Mar 2017 12:26:46 +0000 (20:26 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 5 Mar 2017 09:23:47 +0000 (17:23 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/base-files/files/lib/functions.sh

index b68db6b6bd7e419627b8330f5bf31a780f817561..de3fa96730393b76e39bd4d3ea5f41a104c16b69 100755 (executable)
@@ -35,7 +35,6 @@ list_contains() {
 }
 
 config_load() {
-       [ -n "$IPKG_INSTROOT" ] && return 0
        uci_load "$@"
 }
 
@@ -353,4 +352,4 @@ user_exists() {
        grep -qs "^${1}:" ${IPKG_INSTROOT}/etc/passwd
 }
 
-[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
+. $IPKG_INSTROOT/lib/config/uci.sh