summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-07-31 03:04:32 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-07-31 03:04:32 +0000
commit3e5a9940c628c70677b7dd230ffe8016d0bfaef0 (patch)
tree447633756788b14a7e1ec2e00d2d7cee60df365e /package/base-files/files/etc
parent43c33080b7a359f2ad8d91626322cdd24848f188 (diff)
fix config_clear(), see #3054
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12036 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc')
-rwxr-xr-xpackage/base-files/files/etc/functions.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/base-files/files/etc/functions.sh b/package/base-files/files/etc/functions.sh
index 01db77ce3..0314692c5 100755
--- a/package/base-files/files/etc/functions.sh
+++ b/package/base-files/files/etc/functions.sh
@@ -44,6 +44,7 @@ list_remove() {
val2="${val##* $remove }"
[ "$val2" = "$val" ] && return
val="${val1## } ${val2%% }"
+ val="${val%% }"
eval "export ${NO_EXPORT:+-n} -- \"$var=\$val\""
}
@@ -107,8 +108,8 @@ config_unset() {
config_clear() {
local SECTION="$1"
local oldvar
-
- export ${NO_EXPORT:+-n} CONFIG_SECTIONS="$(echo " $CONFIG_SECTIONS " | sed -e "s, $OLD , ,")"
+
+ list_remove CONFIG_SECTIONS "$SECTION"
export ${NO_EXPORT:+-n} CONFIG_SECTIONS="${SECTION:+$CONFIG_SECTIONS}"
for oldvar in `set | grep ^CONFIG_${SECTION:+${SECTION}_} | \