summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-07-30 19:37:10 +0100
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-01-18 17:24:05 +0000
commit5e8deb94c6f05137942b10b5288a37d9b09fd43f (patch)
tree1cbed6e76c6398d4c183a6b71e0a9927386833d8 /shell-completion
parent94293d65cd4125347e21b3e423d0e245226b1be2 (diff)
downloadsystemd-5e8deb94c6f05137942b10b5288a37d9b09fd43f.tar.gz
core: add DBUS method to bind mount new nodes without service restart
Allow to setup new bind mounts for a service at runtime (via either DBUS or a new 'systemctl bind' verb) with a new helper that forks into the unit's mount namespace. Add a new integration test to cover this. Useful for zero-downtime addition to services that are running inside mount namespaces, especially when using RootImage/RootDirectory. If a service runs with a read-only root, a tmpfs is added on /run to ensure we can create the airlock directory for incoming mounts under /run/host/incoming.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemctl.in2
-rw-r--r--shell-completion/zsh/_systemctl.in5
2 files changed, 6 insertions, 1 deletions
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 4bd80948d6..7e99ef4bf3 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.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'
+ [FILE]='link switch-root bind'
[TARGETS]='set-default'
[MACHINES]='list-machines'
[LOG_LEVEL]='log-level'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 10af6d5121..c4ea78b3c1 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -31,6 +31,7 @@
"reset-failed:Reset failed state for all, one, or more units"
"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"
)
local -a machine_commands=(
@@ -378,6 +379,10 @@ done
_files
}
+(( $+functions[_systemctl_bind] )) || _systemctl_bind() {
+ _files
+ }
+
# no systemctl completion for:
# [STANDALONE]='daemon-reexec daemon-reload default
# emergency exit halt kexec list-jobs list-units