aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-10-14 22:58:26 -0700
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-11-25 17:22:39 +0100
commitb9246bbdc9a97041c5573845a7858ef3b1c54ff2 (patch)
tree56d4b0be5e15db4b816d3ae8b52b7007ad70cd8e /package
parent8582e15616d3d42340810cb9c880825ccf87e1b0 (diff)
downloadupstream-b9246bbdc9a97041c5573845a7858ef3b1c54ff2.tar.gz
upstream-b9246bbdc9a97041c5573845a7858ef3b1c54ff2.tar.bz2
upstream-b9246bbdc9a97041c5573845a7858ef3b1c54ff2.zip
base-files: functions.sh: replace [^...] with [!...] in case
Strictly speaking, ash does not support it. From https://wiki.ubuntu.com/DashAsBinSh#A.5B.5E.5D Not to be confused by sed's and other program's regular expression syntax. Uses of [^...] in case (parameter/word expansion in general) need to be replaced with [!...]. Found with shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2169 Signed-off-by: Rosen Penev <rosenp@gmail.com> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 7da0c872fa..ee4ad1af83 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -108,7 +108,7 @@ config_unset() {
# config_get <section> <option>
config_get() {
case "$2${3:-$1}" in
- *[^A-Za-z0-9_]*) : ;;
+ *[!A-Za-z0-9_]*) : ;;
*)
case "$3" in
"") eval echo "\"\${CONFIG_${1}_${2}:-\${4}}\"";;