bootstrap-vz/plugins/image_commands
2014-01-06 22:58:21 +01:00
..
__init__.py Simplify tasklist by passing a set to the modules 2014-01-06 22:58:21 +01:00
manifest-schema.json Fix image_commands and user_packages plugins 2013-12-14 23:18:39 +01:00
README.md fix call of ImageCommands, object should not be called, only class should be 2013-12-15 08:33:45 +01:00
tasks.py Minor import stmt and dependency fix 2014-01-05 02:25:29 +01:00

Image script plugin

This plugin gives the possibility to the user to execute commands.

Plugin is defined in the manifest file, plugin section with:

"image_commands": {
    "commands": [ [ "touch", "/var/www/index.html" ]],
}

The commands element is an array of commands. Each command is an array describing the executable and its arguments.

Command is executed in current context. It is possible to use variables to access the image or execute chroot commands in the image.

Available variables are: {root} : image mount point (to copy files for example or chroot commands)

Example:

[[ "touch", "{root}/var/www/hello" ],
[ "/usr/sbin/chroot", "{root}", "touch", "/var/www/hello"]]