[openwrt/openwrt] base-files: shinit: properly handle dashes in service names
LEDE Commits
lede-commits at lists.infradead.org
Wed May 12 03:45:50 PDT 2021
jow pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/faf9528a23fcc4885110a405a06b9c9f0c92332e
commit faf9528a23fcc4885110a405a06b9c9f0c92332e
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Wed May 12 12:44:32 2021 +0200
base-files: shinit: properly handle dashes in service names
Fixes: FS#3801
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
(cherry picked from commit 75ea878d1ba05610121a732dc0abf7c914e83ca1)
---
package/base-files/files/etc/shinit | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/etc/shinit b/package/base-files/files/etc/shinit
index 0a1ebcc832..6b682d8769 100644
--- a/package/base-files/files/etc/shinit
+++ b/package/base-files/files/etc/shinit
@@ -22,7 +22,7 @@ service() {
printf "%-30s\t%10s\t%10s\n" "$F" \
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
- | jsonfilter -q -e "@.$(basename $F).instances[*].running" | uniq)" = "true" ] \
+ | jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \
&& echo "running" || echo "stopped" )
done;
return 1
More information about the lede-commits
mailing list