From fa7d088f184486df61fa78de37d301320426d6b8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 7 Apr 2014 10:01:54 +0000 Subject: base-files: move uci_apply_defaults() to /etc/init.d/boot Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40408 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/init.d/boot | 13 ++++++++++++- package/base-files/files/lib/functions.sh | 11 ----------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'package/base-files/files') diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 45cb4a2596..b44c1a69fe 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -4,6 +4,17 @@ START=10 STOP=98 +uci_apply_defaults() { + cd /etc/uci-defaults || return 0 + files="$(ls)" + [ -z "$files" ] && return 0 + mkdir -p /tmp/.uci + for file in $files; do + ( . "./$(basename $file)" ) && rm -f "$file" + done + uci commit +} + boot() { [ -f /proc/mounts ] || /sbin/mount_root [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc @@ -33,7 +44,7 @@ boot() { } rm -f /tmp/wireless.tmp - sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults' + uci_apply_defaults # temporary hack until configd exists /sbin/reload_config diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index fa4c2d670c..cec78c5062 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -368,17 +368,6 @@ jffs2_mark_erase() { echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1" } -uci_apply_defaults() { - cd /etc/uci-defaults || return 0 - files="$(ls)" - [ -z "$files" ] && return 0 - mkdir -p /tmp/.uci - for file in $files; do - ( . "./$(basename $file)" ) && rm -f "$file" - done - uci commit -} - group_add() { local name="$1" local gid="$2" -- cgit v1.2.3