commit a40ac230c0d3ab375fcf8dc74cb69978007d9115
parent 95a2640004c207e3eee31fa4c7816871feaabbfa
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Fri, 29 Jul 2022 01:59:36 +0200
Change how service to bundle list is constructed
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/command/s b/command/s
@@ -21,7 +21,7 @@ load_s6_rc() {
typeset -gA service_bundles bundle_services service_in_bundle service_active
typeset -ga active_services
- local b s
+ local b s bundles
active_services=( "${(@f)"$( s6-rc -a list )"}" ) || exit $?
for s in $active_services; do
@@ -33,7 +33,9 @@ load_s6_rc() {
service_in_bundle[$s//$b]=1
service_bundles[$s]+=$b$'\n'
done
- service_bundles[$s]=${service_bundles[$s]%$'\n'}
+ done
+ for s bundles in "${(kv@)service_bundles}"; do
+ service_bundles[$s]=${bundles%$'\n'}
done
process_bundles