diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-12 12:44:32 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-05-12 12:44:32 +0200 |
commit | 75ea878d1ba05610121a732dc0abf7c914e83ca1 (patch) | |
tree | ee07c118f74009f35f55221fa5b906b22458e125 | |
parent | 1854aeec4d37079690309dec3171d0864339f73a (diff) | |
download | upstream-75ea878d1ba05610121a732dc0abf7c914e83ca1.tar.gz upstream-75ea878d1ba05610121a732dc0abf7c914e83ca1.tar.bz2 upstream-75ea878d1ba05610121a732dc0abf7c914e83ca1.zip |
base-files: shinit: properly handle dashes in service names
Fixes: FS#3801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | package/base-files/files/etc/shinit | 2 |
1 files changed, 1 insertions, 1 deletions
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 |