projects
/
openwrt
/
staging
/
dangole.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
162f019
)
add uci_set_default (to be used in init scripts or /etc/uci-defaults)
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 2 Jan 2008 17:10:16 +0000
(17:10 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 2 Jan 2008 17:10:16 +0000
(17:10 +0000)
SVN-Revision: 10086
package/base-files/files/etc/functions.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/functions.sh
b/package/base-files/files/etc/functions.sh
index 69af187502d8fe2cd13a8dc83acdd39404310a6b..ef2801512f308f6e2d3bc98ae6124dff83a2ccdf 100755
(executable)
--- a/
package/base-files/files/etc/functions.sh
+++ b/
package/base-files/files/etc/functions.sh
@@
-217,3
+217,9
@@
jffs2_mark_erase() {
}
echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1"
}
+
+uci_set_default() {
+ local PACKAGE="$1"
+ [ -e "/etc/config/$1" ] && return 0
+ cat > "/etc/config/$1"
+}