|
|
@ -2677,7 +2677,7 @@ _run_service_action_direct() { |
|
|
|
export SERVICE_CONFIGSTORE="$CONFIGSTORE/$service" |
|
|
|
exname="$exname $ACTION_NAME $SERVICE_NAME" \ |
|
|
|
stdbuf -oL -eL bash -c 'charm.run_direct_action "$@"' -- "$charm" "$action" "$@" |
|
|
|
) |
|
|
|
) 0<&6 ## inject general stdin |
|
|
|
} |
|
|
|
export -f _run_service_action_direct |
|
|
|
|
|
|
@ -2812,6 +2812,7 @@ export -f has_service_action |
|
|
|
run_service_action () { |
|
|
|
local service="$1" action="$2" |
|
|
|
shift ; shift |
|
|
|
exec 6<&0 ## saving stdin |
|
|
|
{ |
|
|
|
if ! read-0 action_type; then |
|
|
|
info "Service $DARKYELLOW$service$NORMAL does not have any action $DARKCYAN$action$NORMAL defined." |
|
|
@ -2820,8 +2821,9 @@ run_service_action () { |
|
|
|
fi |
|
|
|
|
|
|
|
"_run_service_action_${action_type}" "$service" "$action" "$@" |
|
|
|
|
|
|
|
} < <(has_service_action "$service" "$action") |
|
|
|
|
|
|
|
exec 0<&6 6<&- ## restoring stdin |
|
|
|
} |
|
|
|
export -f run_service_action |
|
|
|
|
|
|
|