systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the systemctl bind command.
This commit is contained in:
@@ -214,7 +214,7 @@ _systemctl () {
|
||||
list-timers list-units list-unit-files poweroff
|
||||
reboot rescue show-environment suspend get-default
|
||||
is-system-running preset-all'
|
||||
[FILE]='link switch-root bind'
|
||||
[FILE]='link switch-root bind mount-image'
|
||||
[TARGETS]='set-default'
|
||||
[MACHINES]='list-machines'
|
||||
[LOG_LEVEL]='log-level'
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"list-dependencies:Show unit dependency tree"
|
||||
"clean:Remove configuration, state, cache, logs or runtime data of units"
|
||||
"bind:Bind mount a path from the host into a unit's namespace"
|
||||
"mount-image:Mount an image from the host into a unit's namespace"
|
||||
)
|
||||
|
||||
local -a machine_commands=(
|
||||
@@ -383,6 +384,10 @@ done
|
||||
_files
|
||||
}
|
||||
|
||||
(( $+functions[_systemctl_mount-image] )) || _systemctl_mount-image() {
|
||||
_files
|
||||
}
|
||||
|
||||
# no systemctl completion for:
|
||||
# [STANDALONE]='daemon-reexec daemon-reload default
|
||||
# emergency exit halt kexec list-jobs list-units
|
||||
|
||||
Reference in New Issue
Block a user