2006-11-29 19:17:55 by steve
Add a --config option, just like in xen-create-image
This commit is contained in:
@@ -24,6 +24,8 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory
|
||||
|
||||
Misc Options:
|
||||
--arch Pass the given arch setting to debootstrap or rpmstrap.
|
||||
--config Read the specified config file in addition to the global
|
||||
configuration file.
|
||||
--mirror The mirror to use when installing with 'debootstrap'.
|
||||
|
||||
Installation Options:
|
||||
@@ -57,8 +59,8 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--tar>
|
||||
Untar a .tar file into the new installation location. This tarfile is assumed to contain a complete archived system.
|
||||
=item B<--debootstrap>
|
||||
Install the distribution specified by the B<--dist> argument using the debootstrap. If you use this option you must specify a mirror with B<--mirror>.
|
||||
|
||||
=item B<--copy>
|
||||
Copy the given directory recursively. This local directory is assumed to contain a complete installation.
|
||||
@@ -66,8 +68,8 @@ Copy the given directory recursively. This local directory is assumed to contai
|
||||
=item B<--rpmstrap>
|
||||
Install the distribution specified by B<--dist> using the rpmstrap command.
|
||||
|
||||
=item B<--debootstrap>
|
||||
Install the distribution specified by the B<--dist> argument using the debootstrap. If you use this option you must specify a mirror with B<--mirror>.
|
||||
=item B<--tar>
|
||||
Untar a .tar file into the new installation location. This tarfile is assumed to contain a complete archived system.
|
||||
|
||||
=back
|
||||
|
||||
@@ -80,7 +82,7 @@ Install the distribution specified by the B<--dist> argument using the debootstr
|
||||
--
|
||||
http://www.steve.org.uk/
|
||||
|
||||
$Id: xt-install-image,v 1.40 2006-11-19 19:41:34 steve Exp $
|
||||
$Id: xt-install-image,v 1.41 2006-11-29 19:17:55 steve Exp $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -128,6 +130,24 @@ readConfigurationFile( "/etc/xen-tools/xen-tools.conf" );
|
||||
parseCommandLineArguments();
|
||||
|
||||
|
||||
#
|
||||
# If we received a configuration file then read it.
|
||||
#
|
||||
if ( $CONFIG{'config'} )
|
||||
{
|
||||
my $path = $CONFIG{'config'};
|
||||
|
||||
# If not fully-qualified then read from /etc/xen-tools.
|
||||
if ( $path !~ /^[\/]/ )
|
||||
{
|
||||
$path = "/etc/xen-tools/" . $path;
|
||||
}
|
||||
|
||||
# Read the file, if it exists.
|
||||
readConfigurationFile( $path ) if ( -e $path );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Check our arguments
|
||||
#
|
||||
@@ -362,6 +382,7 @@ sub parseCommandLineArguments
|
||||
# Misc
|
||||
"arch=s", \$CONFIG{'arch'},
|
||||
"cache=s", \$CONFIG{'cache'},
|
||||
"config=s", \$CONFIG{'config'},
|
||||
"mirror=s", \$CONFIG{'mirror'},
|
||||
|
||||
# Help.
|
||||
@@ -377,7 +398,7 @@ sub parseCommandLineArguments
|
||||
|
||||
if ( $VERSION )
|
||||
{
|
||||
my $REVISION = '$Revision: 1.40 $';
|
||||
my $REVISION = '$Revision: 1.41 $';
|
||||
if ( $REVISION =~ /1.([0-9.]+) / )
|
||||
{
|
||||
$REVISION = $1;
|
||||
|
||||
Reference in New Issue
Block a user