Fix #32: Extend image_commands docs

This commit is contained in:
Anders Ingemann 2015-05-02 12:29:34 +02:00
parent e783927ea0
commit a23c9936b6

View file

@ -11,9 +11,22 @@ Settings
- ``commands``: A list of lists containing strings. Each top-level item - ``commands``: A list of lists containing strings. Each top-level item
is a single command, while the strings inside each list comprise is a single command, while the strings inside each list comprise
parts of a command. This allows for proper shell argument escaping parts of a command. This allows for proper shell argument escaping.
(to circumvent this, simply put the entire command in a single To circumvent escaping, simply put the entire command in a single
string). In addition to the manifest variables ``{root}`` is also string, the command will additionally be evaluated in a shell
available. It points at the root of the image volume. (e.g. globbing will work).
In addition to the manifest variables ``{root}`` is also available.
It points at the root of the image volume.
``required`` ``required``
``manifest vars`` ``manifest vars``
Example
~~~~~~~
Create an empty `index.html` in `/var/www` and delete all locales except english.
.. code:: yaml
image_commands:
commands:
- [touch, '{root}/var/www/index.html']
- ['rm -rf /usr/share/locale/[^en]*']