portablectl: add --now and --enable to attach/detach

Add shortcuts to enable and start, or disable and stop, portable
services with a single portablectl command.
Allow to pass a filter on detach, as it's necessary to call
GetImageMetadata to get the unit names associated with an image.

Fixes #10232
This commit is contained in:
Luca Boccassi
2020-02-07 17:09:05 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent c3b41d8811
commit e2c1ddcc49
3 changed files with 246 additions and 4 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ _portablectl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
[STANDALONE]='-q --quiet --runtime --no-reload --cat --no-pager --no-legend
--no-ask-password -h --help --version'
--no-ask-password --enable --now -h --help --version'
[ARG]='-p --profile --copy -H --host -M --machine'
)