mirror of https://github.com/hak5/openwrt.git
base-files: move uci_apply_defaults() to /etc/init.d/boot
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40408lede-17.01
parent
4a6ad541d8
commit
3d275a8deb
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue