do not start multiple subshells for applying /etc/uci-defaults. use sh -x for hush...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 9 Dec 2009 15:15:25 +0000 (15:15 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 9 Dec 2009 15:15:25 +0000 (15:15 +0000)
SVN-Revision: 18717

package/base-files/files/etc/functions.sh
package/base-files/files/etc/init.d/boot

index a788c4cc4efcf90a228cfd25dd4fa5288d71fe73..61c04953d39ae101c822d7b201b3f45cb7ee1c3f 100755 (executable)
@@ -263,7 +263,7 @@ jffs2_mark_erase() {
        echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1"
 }
 
-uci_apply_defaults() {(
+uci_apply_defaults() {
        cd /etc/uci-defaults || return 0
        files="$(ls)"
        [ -z "$files" ] && return 0
@@ -272,6 +272,6 @@ uci_apply_defaults() {(
                ( . "./$(basename $file)" ) && rm -f "$file"
        done
        uci commit
-)}
+}
 
 [ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
index aa9e967787467e72a90a6bcceb799b1119f3dabf..2ed4c50613c5e2ac32d3380fdb021e5f41cd8557 100755 (executable)
@@ -35,10 +35,9 @@ system_config() {
        [ -x /sbin/klogd ] && klogd ${klogconloglevel:+-c $klogconloglevel}
 }
 
-apply_uci_config() {(
-       include /lib/config
-       uci_apply_defaults
-)}
+apply_uci_config() {
+       sh -c '. /etc/functions.sh; include /lib/config; uci_apply_defaults'
+}
 
 start() {
        [ -f /proc/mounts ] || /sbin/mount_root