From: Felix Fietkau Date: Wed, 9 Dec 2009 15:15:25 +0000 (+0000) Subject: do not start multiple subshells for applying /etc/uci-defaults. use sh -x for hush... X-Git-Tag: reboot~21698 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=889532d1fd7d2fe969f5ae454e38bf8f1e59bd95;p=openwrt%2Fopenwrt.git do not start multiple subshells for applying /etc/uci-defaults. use sh -x for hush compatibility SVN-Revision: 18717 --- diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh index a788c4cc4e..61c04953d3 100755 --- a/package/base-files/files/etc/functions.sh +++ b/package/base-files/files/etc/functions.sh @@ -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 diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index aa9e967787..2ed4c50613 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -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