summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-06 11:08:33 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-06 23:00:17 +0200
commitce2291730d5f91190e97e7c515ac772ae4970062 (patch)
treeaf19f6f1f2f760fe7f64606784e5877947e88791 /shell-completion
parentnspawn: Drop unused includes (diff)
downloadsystemd-ce2291730d5f91190e97e7c515ac772ae4970062.tar.xz
systemd-ce2291730d5f91190e97e7c515ac772ae4970062.zip
nspawn: Allow specifying custom init program
This allows for example forcing to use /sbin/init instead of always using /usr/lib/systemd/systemd if it exists. Or it allows using a different path altogether.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemd-nspawn2
-rw-r--r--shell-completion/zsh/_systemd-nspawn1
2 files changed, 2 insertions, 1 deletions
diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn
index 0a1761d110..fc0286c8e1 100644
--- a/shell-completion/bash/systemd-nspawn
+++ b/shell-completion/bash/systemd-nspawn
@@ -74,7 +74,7 @@ _systemd_nspawn() {
--pivot-root --property --private-users --private-users-ownership --network-namespace-path
--network-ipvlan --network-veth-extra --network-zone -p --port --system-call-filter --overlay
--overlay-ro --settings --rlimit --hostname --no-new-privileges --oom-score-adjust --cpu-affinity
- --resolv-conf --timezone --root-hash-sig --background --oci-bundle --verity-data'
+ --resolv-conf --timezone --root-hash-sig --background --oci-bundle --verity-data --init'
)
_init_completion || return
diff --git a/shell-completion/zsh/_systemd-nspawn b/shell-completion/zsh/_systemd-nspawn
index a9856b5008..1f510ccb74 100644
--- a/shell-completion/zsh/_systemd-nspawn
+++ b/shell-completion/zsh/_systemd-nspawn
@@ -21,6 +21,7 @@ _arguments \
'(--ephemeral -x)'{--ephemeral,-x}'[Run container with snapshot of root directory, and remove it after exit.]' \
'(--image -i)'{--image=,-i+}'[Disk image to mount the root directory for the container from.]:disk image: _files' \
'(--boot -b)'{--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \
+ '--init=[Invoke the specified program as init in the container.]: : _message "path to init"' \
'(--user -u)'{--user=,-u+}'[Run the command under specified user, create home directory and cd into it.]:user:_users' \
'(--machine -M)'{--machine=,-M+}'[Sets the machine name for this container.]: : _message "container name"' \
'--uuid=[Set the specified uuid for the container.]: : _message "container UUID"' \