1
0
mirror of synced 2026-04-28 13:07:29 +00:00

2006-08-19 08:19:27 by steve

Added documentation on argument passing.
This commit is contained in:
steve
2006-08-19 08:19:27 +00:00
parent 7924c1d00a
commit d8a671ba6e

View File

@@ -2,7 +2,7 @@
=head1 NAME
xt-create-config - Create a Xen configuration file for a new domain.
xt-create-config - Create a Xen configuration file for a new guest
=cut
@@ -28,16 +28,37 @@ xt-create-config - Create a Xen configuration file for a new domain.
=head1 ABOUT
This script is invoked by B<xen-create-image> after it has created and
customised a new Xen domain. It is responsible for creating the
configuration file that Xen should use to start the instance.
This script is invoked by xen-create-image after it has created and
customised a new Xen guest. It is responsible for creating the
configuration file which Xen will use to start the instance.
The configuration file will be created in the directory /etc/xen using
the template file B</etc/xen-tools/xm.tmpl> to specify what is included.
a template file to determine how the configuration file should be
created.
By default the script will use /etc/xen-tools/xm.tmpl as its input.
=cut
=head1 INVOCATION
This script will be invoked by the xen-create-image script, rather than
directly.
This is because it will expect to receive the values to insert into the
output template in as environmental variables.
You could execute it manually via a long command line, but that is
error-prone and probably not useful:
=for example begin
hostname=foo.my.flat ip=192.168.1.2 ... xm-create-xen-config \
--output=/etc/xen --template=/etc/xen-tools/xm.tmpl
=for example end
If you wish to make changes to the Xen configuration file for every
domain which is created then you should modify the master template rather
than fixing up each new instances configuration afterwards.
=cut
@@ -48,6 +69,24 @@ xt-create-config - Create a Xen configuration file for a new domain.
xen-create-image in its environment, along with several command line
arguments.
This has several implications for customization. If you wish to
setup a new variable in the output template such as "foo=bar" you
could update the script to include "${foo}", then invoke
xen-create-image with this environmental variable set.
=for example begin
$ foo=bar xen-create-image --hostname=test.my.flat ...
=for example end
The environment will be duplicated/inheritted by this script when
it is executed, and your variable will be included in the output file.
For details on the template file syntax please see the documentation
for the "Text::Template" perl module. (If you have the perldoc
package installed you can read this with "perldoc Text::Template".)
=cut
@@ -57,7 +96,7 @@ xt-create-config - Create a Xen configuration file for a new domain.
--
http://www.steve.org.uk/
$Id: xt-create-xen-config,v 1.15 2006-08-16 09:42:44 steve Exp $
$Id: xt-create-xen-config,v 1.16 2006-08-19 08:19:27 steve Exp $
=cut
@@ -164,7 +203,7 @@ sub parseCommandLineArguments
if ( $VERSION )
{
my $REVISION = '$Revision: 1.15 $';
my $REVISION = '$Revision: 1.16 $';
if ( $REVISION =~ /1.([0-9.]+) / )
{