diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-04-11 19:34:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-04-11 19:34:20 +0000 |
commit | 30dfff4849d178906314dabe3180e96b29ad423d (patch) | |
tree | e15b1581a22d079f1b4829566667ce71787c22a2 /package | |
parent | 3885d2b5423b290251c56a98a112ef6c2b8200e1 (diff) | |
download | upstream-30dfff4849d178906314dabe3180e96b29ad423d.tar.gz upstream-30dfff4849d178906314dabe3180e96b29ad423d.tar.bz2 upstream-30dfff4849d178906314dabe3180e96b29ad423d.zip |
allow scripts to disable config callbacks
SVN-Revision: 6934
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/etc/functions.sh | 4 |
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() { |