Commit b7dac2d0 authored by Martin Peres's avatar Martin Peres
Browse files

initscript/container: allow multi-word command lines

This enables adding more arguments to podman, or changing the exec
command.
parent b9073da4
......@@ -46,7 +46,9 @@ that needs to be executed. In `grub.cfg`, this could look like this:
Here is a list of options:
* b2c.container: Name of the container that should be executed at boot. Format: See [podman's image format](https://docs.podman.io/en/latest/markdown/podman-run.1.html#image)
* b2c.container: Name of the container that should be executed at boot. Format: See [podman's image format](https://docs.podman.io/en/latest/markdown/podman-run.1.html#image). Examples:
* b2c.container=docker://registry.hub.docker.com/library/hello-world
* b2c.container="-ti docker://registry.hub.docker.com/library/alpine:latest /bin/sh"
* b2c.cache_device: Use a cache to store the image layers, thus saving on network usage:
* none (default): Do not use any cache, guaranteeing a fresh environment every time
* auto: Re-use a previously-setup drive, or pick a suitable one, and partition it! (**WILL ERASE YOUR DATA**)
......
......@@ -233,7 +233,7 @@ function create_container {
# the hammer!
for i in 0 1 2 3; do
# Set up the wanted container
container_id=`podman create --rm --privileged --network=host --runtime /bin/crun-no-pivot $@` \
container_id=`eval "podman create --rm --privileged --network=host --runtime /bin/crun-no-pivot $@"` \
&& podman init "$container_id" && return 0
# The command failed... Ignore the first 3 times, as we want to check it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment