Commit cddd7b4c authored by Günther Kelleter's avatar Günther Kelleter Committed by Jo-Philipp Wich
Browse files

base-files: config_get: prevent filename globbing



When config_get is called as "config_get section option" the option
is unexpectedly globbed by the shell which differs from the way options
are read to a variable with "config_get variable section option".
Add another layer of double quotes to fix it.
Signed-off-by: default avatarGünther Kelleter <guenther.kelleter@devolo.de>
(backported from commit c3389ab1)
parent e6162b21
......@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
include $(INCLUDE_DIR)/feeds.mk
PKG_NAME:=base-files
PKG_RELEASE:=194.1
PKG_RELEASE:=194.2
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
......
......@@ -92,7 +92,7 @@ config_unset() {
# config_get <section> <option>
config_get() {
case "$3" in
"") eval echo "\${CONFIG_${1}_${2}:-\${4}}";;
"") eval echo "\"\${CONFIG_${1}_${2}:-\${4}}\"";;
*) eval export ${NO_EXPORT:+-n} -- "${1}=\${CONFIG_${2}_${3}:-\${4}}";;
esac
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment