aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-04-11 19:34:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-04-11 19:34:20 +0000
commit907ee5cf696ea332a6b66b773a9698b62e97f2fe (patch)
tree0a21890e13c4f54e1b955cd55984ec09c10f1394 /package/base-files
parent320bf65279b5ab7daa6a0e6daf33a570ce1f9602 (diff)
downloadupstream-907ee5cf696ea332a6b66b773a9698b62e97f2fe.tar.gz
upstream-907ee5cf696ea332a6b66b773a9698b62e97f2fe.tar.bz2
upstream-907ee5cf696ea332a6b66b773a9698b62e97f2fe.zip
allow scripts to disable config callbacks
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6934 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh
index 72e60bb511..dac46a3497 100755
--- a/package/base-files/files/etc/functions.sh
+++ b/package/base-files/files/etc/functions.sh
@@ -36,7 +36,7 @@ config () {
export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$(($CONFIG_NUM_SECTIONS + 1))
name="${name:-cfg$CONFIG_NUM_SECTIONS}"
append CONFIG_SECTIONS "$name"
- config_cb "$cfgtype" "$name"
+ [ -n "$NO_CALLBACK" ] || config_cb "$cfgtype" "$name"
export ${NO_EXPORT:+-n} CONFIG_SECTION="$name"
export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_TYPE=$cfgtype"
}
@@ -46,7 +46,7 @@ option () {
local value="$*"
export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_${varname}=$value"
- option_cb "$varname" "$*"
+ [ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*"
}
config_rename() {