Fix #99: Rename image_commands to commands

This commit is contained in:
Anders Ingemann 2015-05-02 12:36:14 +02:00
parent a9b1624427
commit fa8da6171d
5 changed files with 8 additions and 8 deletions

View file

@ -26,7 +26,7 @@ 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]*']
commands:
commands:
- [touch, '{root}/var/www/index.html']
- ['rm -rf /usr/share/locale/[^en]*']

View file

@ -3,7 +3,7 @@ $schema: http://json-schema.org/draft-04/schema#
properties:
plugins:
properties:
image_commands:
commands:
properties:
commands:
items:
@ -17,7 +17,7 @@ properties:
- commands
type: object
required:
- image_commands
- commands
type: object
required:
- plugins

View file

@ -9,7 +9,7 @@ class ImageExecuteCommand(Task):
@classmethod
def run(cls, info):
from bootstrapvz.common.tools import log_check_call
for raw_command in info.manifest.plugins['image_commands']['commands']:
for raw_command in info.manifest.plugins['commands']['commands']:
command = map(lambda part: part.format(root=info.root, **info.manifest_vars), raw_command)
shell = len(command) == 1
log_check_call(command, shell=shell)

View file

@ -214,7 +214,7 @@ boot, root and swap.
optional setting overrides the command bootstrap-vz would normally
use to format the partition. The command is specified as a string
array where each option/argument is an item in that array (much
like the `image\_commands <../bootstrapvz/plugins/image_commands>`__ plugin).
like the `commands <../bootstrapvz/plugins/commands>`__ plugin).
``optional`` The following variables are available:
- ``{fs}``: The filesystem of the partition.
- ``{device_path}``: The device path of the partition.