bootstrap-vz/plugins/image_commands
2013-12-13 10:03:17 +01:00
..
__init__.py add new plugin image_commands to execute cmd or scripts in image 2013-09-09 22:55:14 +02:00
image_commands.py remove old and unused imports, closes #117 2013-12-13 10:03:17 +01:00
manifest-schema.json add new plugin image_commands to execute cmd or scripts in image 2013-09-09 22:55:14 +02:00
README.md Fix #104. Remove "enabled" from plugin manifests 2013-11-22 09:03:47 +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) {filesystem} : used filesystem {image} : image file path

Example:

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