allow scripts to disable config callbacks
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Apr 2007 19:34:20 +0000 (19:34 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Apr 2007 19:34:20 +0000 (19:34 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6934 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/etc/functions.sh

index 72e60bb..dac46a3 100755 (executable)
@@ -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"
        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"
 }
        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"
        local value="$*"
        
        export ${NO_EXPORT:+-n} "CONFIG_${CONFIG_SECTION}_${varname}=$value"
-       option_cb "$varname" "$*"
+       [ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*"
 }
 
 config_rename() {
 }
 
 config_rename() {
This page took 0.025233 seconds and 4 git commands to generate.