_systemd-nspawn revision 30fd4d1eb13a200ebcc852d3ce28f3cb30197957
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas#compdef systemd-nspawn
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas_nspawn-caps(){
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas local -a _caps
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas _caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE CAP_LINUX_IMMUTABLE
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID CAP_SETFCAP CAP_SETPCAP
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas CAP_SYS_RESOURCE CAP_SYS_BOOT )
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas _values -s , 'capabilities' "$_caps[@]"
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas {-h,--help}'[Show this help]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas {--directory=,-D}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas {--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas {--user=,-u}'[Run the command under specified user, create home directory and cd into it.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas '--uuid=[Set the specified uuid for the container.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas {--controllers=,-C}'[Makes the container appear in other hierarchies than the name=systemd:/ one. Takes a comma-separated list of controllers.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas '--private-network[Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the loopback device.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas '--read-only[Mount the root file system read only for the container.]' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas '--capability=[List one or more additional capabilities to grant the container.]:capabilities:_nspawn-caps' \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas "--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no, host, guest, auto)" \
30fd4d1eb13a200ebcc852d3ce28f3cb30197957William Giokas '-j[Equivalent to --link-journal=guest.]'