Add an 'Image Configuration' menu to menuconfig Packages can export a list of config options with labels and data types through the metadata. The selected config values will be exported to the target filesystem in /etc/uci-defaults and applied on the first boot.

SVN-Revision: 6572
This commit is contained in:
Felix Fietkau
2007-03-16 03:02:31 +00:00
parent 7b1a36cab4
commit 2c62bddcfe
9 changed files with 166 additions and 115 deletions

View File

@@ -28,6 +28,17 @@ uci_load() {
}
}
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
)}
uci_do_update() {
local FILENAME="$1"
local UPDATE="$2"