Compare commits
4 Commits
domaindir
...
bash-compl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d85e969776 | ||
|
|
0231844eb1 | ||
|
|
27b2a55fab | ||
|
|
e0c242e388 |
@@ -216,35 +216,19 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH.
|
|||||||
|
|
||||||
Mandatory options:
|
Mandatory options:
|
||||||
|
|
||||||
--domaindir=dir
|
|
||||||
--dir=dir Specify where the output images should go.
|
--dir=dir Specify where the output images should go.
|
||||||
Subdirectories will be created for each guest.
|
Subdirectories will be created for each guest
|
||||||
|
If you do not wish to use loopback images specify --lvm
|
||||||
Using --dir will create subdirectory domains as before
|
or --evms. (These three options are mutually exclusive.)
|
||||||
for backwards compatibility, e.g. if you use
|
|
||||||
--dir=foo, the default disk image will go to
|
|
||||||
foo/domains/$hostname/disk.img.
|
|
||||||
|
|
||||||
Using --domaindir will create direct subdirectories
|
|
||||||
named after the hostname as discussed in
|
|
||||||
http://bugs.debian.org/477238, e.g. if you use
|
|
||||||
--domaindir=foo, the default disk image will go to
|
|
||||||
foo/$hostname/disk.img.
|
|
||||||
|
|
||||||
If you do not wish to use loopback images specify
|
|
||||||
--lvm or --evms. (These three respectively four
|
|
||||||
options are mutually exclusive.)
|
|
||||||
|
|
||||||
--lvm=vg Specify the volume group to save images within.
|
--lvm=vg Specify the volume group to save images within.
|
||||||
If you do not wish to use LVM specify --evms. or
|
If you do not wish to use LVM specify --dir or --evms.
|
||||||
--dir/--domaindir (These three respectively four
|
(These three options are mutually exclusive.)
|
||||||
options are mutually exclusive.)
|
|
||||||
|
|
||||||
--evms=lvm2/container
|
--evms=lvm2/container
|
||||||
Specify the container to save images within, i.e. '--evms
|
Specify the container to save images within, i.e. '--evms
|
||||||
lvm2/mycontainer'. If you do not wish to use EVMS specify
|
lvm2/mycontainer'. If you do not wish to use EVMS specify
|
||||||
--dir/--domaindir or --lvm. (These three respectively
|
--dir or --lvm. (These three options are mutually exclusive.)
|
||||||
four options are mutually exclusive.)
|
|
||||||
|
|
||||||
--hostname=host.example.org
|
--hostname=host.example.org
|
||||||
Set the hostname of the new guest system. Ideally
|
Set the hostname of the new guest system. Ideally
|
||||||
@@ -878,7 +862,7 @@ checkBinariesPresent();
|
|||||||
if ( !$#PARTITIONS )
|
if ( !$#PARTITIONS )
|
||||||
{
|
{
|
||||||
populatePartitionsData()
|
populatePartitionsData()
|
||||||
if ( ( $CONFIG{ 'domaindir' } ) ||
|
if ( ( $CONFIG{ 'dir' } ) ||
|
||||||
( $CONFIG{ 'evms' } ) ||
|
( $CONFIG{ 'evms' } ) ||
|
||||||
( $CONFIG{ 'lvm' } ) );
|
( $CONFIG{ 'lvm' } ) );
|
||||||
}
|
}
|
||||||
@@ -894,7 +878,7 @@ showSummary();
|
|||||||
#
|
#
|
||||||
# Create and format the images if we're using loopback filesystems.
|
# Create and format the images if we're using loopback filesystems.
|
||||||
#
|
#
|
||||||
if ( $CONFIG{ 'domaindir' } )
|
if ( $CONFIG{ 'dir' } )
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -1463,7 +1447,6 @@ sub parseCommandLineArguments
|
|||||||
my %install;
|
my %install;
|
||||||
$install{ 'evms' } = undef;
|
$install{ 'evms' } = undef;
|
||||||
$install{ 'dir' } = undef;
|
$install{ 'dir' } = undef;
|
||||||
$install{ 'domaindir' } = undef;
|
|
||||||
$install{ 'lvm' } = undef;
|
$install{ 'lvm' } = undef;
|
||||||
$install{ 'image-dev' } = undef;
|
$install{ 'image-dev' } = undef;
|
||||||
|
|
||||||
@@ -1486,7 +1469,6 @@ sub parseCommandLineArguments
|
|||||||
|
|
||||||
# Locations
|
# Locations
|
||||||
"dir=s", \$install{ 'dir' },
|
"dir=s", \$install{ 'dir' },
|
||||||
"domaindir=s", \$install{ 'domaindir' },
|
|
||||||
"evms=s", \$install{ 'evms' },
|
"evms=s", \$install{ 'evms' },
|
||||||
"kernel=s", \$CONFIG{ 'kernel' },
|
"kernel=s", \$CONFIG{ 'kernel' },
|
||||||
"initrd=s", \$CONFIG{ 'initrd' },
|
"initrd=s", \$CONFIG{ 'initrd' },
|
||||||
@@ -1575,22 +1557,12 @@ sub parseCommandLineArguments
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now make ensure that the command line setting of '--lvm', '--evms',
|
# Now make ensure that the command line setting of '--lvm', '--evms'
|
||||||
# '--domaindir=x' and '--dir=x' override anything specified in the
|
# and '--dir=x' override anything specified in the configuration file.
|
||||||
# configuration file.
|
|
||||||
#
|
#
|
||||||
if ( $install{ 'dir' } )
|
if ( $install{ 'dir' } )
|
||||||
{
|
{
|
||||||
$CONFIG{ 'dir' } = undef;
|
$CONFIG{ 'dir' } = $install{ 'dir' };
|
||||||
$CONFIG{ 'domaindir' } = $install{ 'dir' }.'/domains';
|
|
||||||
$CONFIG{ 'evms' } = undef;
|
|
||||||
$CONFIG{ 'lvm' } = undef;
|
|
||||||
$CONFIG{ 'image-dev' } = undef;
|
|
||||||
}
|
|
||||||
if ( $install{ 'domaindir' } )
|
|
||||||
{
|
|
||||||
$CONFIG{ 'dir' } = undef;
|
|
||||||
$CONFIG{ 'domaindir' } = $install{ 'domaindir' };
|
|
||||||
$CONFIG{ 'evms' } = undef;
|
$CONFIG{ 'evms' } = undef;
|
||||||
$CONFIG{ 'lvm' } = undef;
|
$CONFIG{ 'lvm' } = undef;
|
||||||
$CONFIG{ 'image-dev' } = undef;
|
$CONFIG{ 'image-dev' } = undef;
|
||||||
@@ -1598,7 +1570,6 @@ sub parseCommandLineArguments
|
|||||||
if ( $install{ 'evms' } )
|
if ( $install{ 'evms' } )
|
||||||
{
|
{
|
||||||
$CONFIG{ 'dir' } = undef;
|
$CONFIG{ 'dir' } = undef;
|
||||||
$CONFIG{ 'domaindir' } = undef;
|
|
||||||
$CONFIG{ 'evms' } = $install{ 'evms' };
|
$CONFIG{ 'evms' } = $install{ 'evms' };
|
||||||
$CONFIG{ 'lvm' } = undef;
|
$CONFIG{ 'lvm' } = undef;
|
||||||
$CONFIG{ 'image-dev' } = undef;
|
$CONFIG{ 'image-dev' } = undef;
|
||||||
@@ -1606,7 +1577,6 @@ sub parseCommandLineArguments
|
|||||||
if ( $install{ 'lvm' } )
|
if ( $install{ 'lvm' } )
|
||||||
{
|
{
|
||||||
$CONFIG{ 'dir' } = undef;
|
$CONFIG{ 'dir' } = undef;
|
||||||
$CONFIG{ 'domaindir' } = undef;
|
|
||||||
$CONFIG{ 'evms' } = undef;
|
$CONFIG{ 'evms' } = undef;
|
||||||
$CONFIG{ 'lvm' } = $install{ 'lvm' };
|
$CONFIG{ 'lvm' } = $install{ 'lvm' };
|
||||||
$CONFIG{ 'image-dev' } = undef;
|
$CONFIG{ 'image-dev' } = undef;
|
||||||
@@ -1614,7 +1584,6 @@ sub parseCommandLineArguments
|
|||||||
if ( $install{ 'image-dev' } )
|
if ( $install{ 'image-dev' } )
|
||||||
{
|
{
|
||||||
$CONFIG{ 'dir' } = undef;
|
$CONFIG{ 'dir' } = undef;
|
||||||
$CONFIG{ 'domaindir' } = undef;
|
|
||||||
$CONFIG{ 'evms' } = undef;
|
$CONFIG{ 'evms' } = undef;
|
||||||
$CONFIG{ 'lvm' } = undef;
|
$CONFIG{ 'lvm' } = undef;
|
||||||
$CONFIG{ 'image-dev' } = $install{ 'image-dev' };
|
$CONFIG{ 'image-dev' } = $install{ 'image-dev' };
|
||||||
@@ -1740,7 +1709,7 @@ sub checkArguments
|
|||||||
my $err = <<E_OR;
|
my $err = <<E_OR;
|
||||||
|
|
||||||
We are trying to configure an installation of $CONFIG{'dist'} in
|
We are trying to configure an installation of $CONFIG{'dist'} in
|
||||||
$CONFIG{'domaindir'} - but there is no hook directory for us to use.
|
$CONFIG{'dir'} - but there is no hook directory for us to use.
|
||||||
|
|
||||||
This means we do not know how to configure this installation.
|
This means we do not know how to configure this installation.
|
||||||
|
|
||||||
@@ -2138,7 +2107,7 @@ sub checkBinariesPresent
|
|||||||
#
|
#
|
||||||
# Image type specific binaries
|
# Image type specific binaries
|
||||||
#
|
#
|
||||||
if ( defined( $CONFIG{ 'domaindir' } ) )
|
if ( defined( $CONFIG{ 'dir' } ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
# loopback image
|
# loopback image
|
||||||
@@ -2673,7 +2642,7 @@ sub createLoopbackImages
|
|||||||
#
|
#
|
||||||
# Make sure we have the relevant output directory.
|
# Make sure we have the relevant output directory.
|
||||||
#
|
#
|
||||||
my $output = $CONFIG{ 'domaindir' } . '/' . $CONFIG{ 'hostname' };
|
my $output = $CONFIG{ 'dir' } . "/domains/" . $CONFIG{ 'hostname' };
|
||||||
|
|
||||||
if ( !-d $output )
|
if ( !-d $output )
|
||||||
{
|
{
|
||||||
@@ -2697,7 +2666,7 @@ sub createLoopbackImages
|
|||||||
foreach my $partition (@PARTITIONS)
|
foreach my $partition (@PARTITIONS)
|
||||||
{
|
{
|
||||||
my $disk =
|
my $disk =
|
||||||
$CONFIG{ 'domaindir' } . '/' . $CONFIG{ 'hostname' } . '/' .
|
$CONFIG{ 'dir' } . '/domains/' . $CONFIG{ 'hostname' } . '/' .
|
||||||
$partition->{ 'name' } . '.img';
|
$partition->{ 'name' } . '.img';
|
||||||
|
|
||||||
if ( -e $disk )
|
if ( -e $disk )
|
||||||
@@ -2716,7 +2685,7 @@ sub createLoopbackImages
|
|||||||
foreach my $partition (@PARTITIONS)
|
foreach my $partition (@PARTITIONS)
|
||||||
{
|
{
|
||||||
my $disk =
|
my $disk =
|
||||||
$CONFIG{ 'domaindir' } . '/' . $CONFIG{ 'hostname' } . '/' .
|
$CONFIG{ 'dir' } . '/domains/' . $CONFIG{ 'hostname' } . '/' .
|
||||||
$partition->{ 'name' } . '.img';
|
$partition->{ 'name' } . '.img';
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -15,12 +15,9 @@ xen-delete-image - Delete previously created Xen instances.
|
|||||||
--verbose Show diagnostic output.
|
--verbose Show diagnostic output.
|
||||||
|
|
||||||
General options:
|
General options:
|
||||||
--dir Specify the output directory where images were previously
|
--dir Specify the output directory where images were previously saved.
|
||||||
saved. (old style)
|
--lvm Specify the LVM volume to use.
|
||||||
--domaindir Specify the output directory where images were previously
|
--evms Specify the EVMS container to use.
|
||||||
saved. (new style)
|
|
||||||
--lvm Specify the LVM volume to use.
|
|
||||||
--evms Specify the EVMS container to use.
|
|
||||||
|
|
||||||
Specifying hosts:
|
Specifying hosts:
|
||||||
--hostname Specify the image name to delete.
|
--hostname Specify the image name to delete.
|
||||||
@@ -36,14 +33,7 @@ xen-delete-image - Delete previously created Xen instances.
|
|||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--dir>
|
=item B<--dir>
|
||||||
Specify the output directory where images were previously saved. Looks
|
Specify the output directory where images were previously saved.
|
||||||
for directories named after the hostname in a subdirectory
|
|
||||||
"domains". (old style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--domaindir>
|
|
||||||
Specify the output directory where images were previously saved. Looks
|
|
||||||
for directories named after the hostname directorly in this
|
|
||||||
directory. (new style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--evms>
|
=item B<--evms>
|
||||||
Specify the EVMS container where images were previously saved.
|
Specify the EVMS container where images were previously saved.
|
||||||
@@ -355,7 +345,6 @@ sub parseCommandLineArguments
|
|||||||
# Parse options.
|
# Parse options.
|
||||||
#
|
#
|
||||||
GetOptions( "dir=s", \$CONFIG{ 'dir' },
|
GetOptions( "dir=s", \$CONFIG{ 'dir' },
|
||||||
"domaindir=s", \$CONFIG{ 'domaindir' },
|
|
||||||
"dry-run", \$CONFIG{ 'dry-run' },
|
"dry-run", \$CONFIG{ 'dry-run' },
|
||||||
"lvm=s", \$CONFIG{ 'lvm' },
|
"lvm=s", \$CONFIG{ 'lvm' },
|
||||||
"evms=s", \$CONFIG{ 'evms' },
|
"evms=s", \$CONFIG{ 'evms' },
|
||||||
@@ -370,6 +359,7 @@ sub parseCommandLineArguments
|
|||||||
pod2usage(1) if $HELP;
|
pod2usage(1) if $HELP;
|
||||||
pod2usage( -verbose => 2 ) if $MANUAL;
|
pod2usage( -verbose => 2 ) if $MANUAL;
|
||||||
|
|
||||||
|
|
||||||
if ($VERSION)
|
if ($VERSION)
|
||||||
{
|
{
|
||||||
my $REVISION = '$Revision: 1.41 $';
|
my $REVISION = '$Revision: 1.41 $';
|
||||||
@@ -383,11 +373,6 @@ sub parseCommandLineArguments
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($CONFIG{ 'dir' }) {
|
|
||||||
$CONFIG{ 'domaindir' } = $CONFIG{ 'dir' }.'/domains';
|
|
||||||
$CONFIG{ 'dir' } = undef;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -416,7 +401,7 @@ sub checkArguments
|
|||||||
# Make sure we got one and only one installation method.
|
# Make sure we got one and only one installation method.
|
||||||
#
|
#
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
foreach my $type (qw/dir domaindir lvm evms/)
|
foreach my $type (qw/dir lvm evms/)
|
||||||
{
|
{
|
||||||
$count += 1 if defined( $CONFIG{ $type } );
|
$count += 1 if defined( $CONFIG{ $type } );
|
||||||
}
|
}
|
||||||
@@ -429,7 +414,6 @@ sub checkArguments
|
|||||||
{
|
{
|
||||||
print "Please select one and only one of the installation methods:\n";
|
print "Please select one and only one of the installation methods:\n";
|
||||||
print " --dir\n";
|
print " --dir\n";
|
||||||
print " --domaindir\n";
|
|
||||||
print " --evms\n";
|
print " --evms\n";
|
||||||
print " --lvm\n";
|
print " --lvm\n";
|
||||||
exit;
|
exit;
|
||||||
@@ -520,9 +504,9 @@ sub deleteXenImage
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( defined( $CONFIG{ 'domaindir' } ) )
|
if ( defined( $CONFIG{ 'dir' } ) )
|
||||||
{
|
{
|
||||||
my $prefix = $CONFIG{ 'domaindir' } . '/';
|
my $prefix = $CONFIG{ 'dir' } . "/domains/";
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now remove the directory.
|
# Now remove the directory.
|
||||||
|
|||||||
@@ -15,11 +15,10 @@ xen-resize-guest - Resize a loopback or LVM based xen guest.
|
|||||||
--verbose Show diagnostic output.
|
--verbose Show diagnostic output.
|
||||||
|
|
||||||
General Options:
|
General Options:
|
||||||
--add Specify the amount of space to add, e.g. --add=1gb
|
--add Specify the amount of space to add, e.g. --add=1gb
|
||||||
--dir Specify the path to the loopback image root. (old style)
|
--dir Specify the path to the loopback image root.
|
||||||
--domaindir Specify the path to the loopback image root. (new style)
|
--force Force the resize to happen without a last-chance delay.
|
||||||
--force Force the resize to happen without a last-chance delay.
|
--hostname Specify the hostname of the guest to resize.
|
||||||
--hostname Specify the hostname of the guest to resize.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@@ -29,14 +28,10 @@ xen-resize-guest - Resize a loopback or LVM based xen guest.
|
|||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--add>
|
=item B<--add>
|
||||||
Specify the amount of storage to add to the primary disk. Looks
|
Specify the amount of storage to add to the primary disk.
|
||||||
for directories named after the hostname in a subdirectory
|
|
||||||
"domains". (old style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--domaindir>
|
=item B<--dir>
|
||||||
Specify the directory where the loopback files are based. Looks
|
Specify the directory where the loopback files are based.
|
||||||
for directories named after the hostname directorly in this
|
|
||||||
directory. (new style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--force>
|
=item B<--force>
|
||||||
Don't pause for 10 seconds prior to commencing.
|
Don't pause for 10 seconds prior to commencing.
|
||||||
@@ -148,14 +143,14 @@ testArguments();
|
|||||||
#
|
#
|
||||||
my $path = undef;
|
my $path = undef;
|
||||||
|
|
||||||
if ( $CONFIG{ 'domaindir' } )
|
if ( $CONFIG{ 'dir' } )
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make sure we can find the disk
|
# Make sure we can find the disk
|
||||||
#
|
#
|
||||||
$path =
|
$path =
|
||||||
$CONFIG{ 'domaindir' } . '/' . $CONFIG{ 'hostname' } . "/disk.img";
|
$CONFIG{ 'dir' } . "/domains/" . $CONFIG{ 'hostname' } . "/disk.img";
|
||||||
if ( !-e $path )
|
if ( !-e $path )
|
||||||
{
|
{
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
@@ -397,7 +392,6 @@ sub parseCommandLineArguments
|
|||||||
# Misc. options
|
# Misc. options
|
||||||
"add=s", \$CONFIG{ 'add' },
|
"add=s", \$CONFIG{ 'add' },
|
||||||
"dir=s", \$install{ 'dir' },
|
"dir=s", \$install{ 'dir' },
|
||||||
"domaindir=s",\$install{ 'domaindir' },
|
|
||||||
"lvm=s", \$install{ 'lvm' },
|
"lvm=s", \$install{ 'lvm' },
|
||||||
"hostname=s", \$CONFIG{ 'hostname' },
|
"hostname=s", \$CONFIG{ 'hostname' },
|
||||||
"force", \$CONFIG{ 'force' },
|
"force", \$CONFIG{ 'force' },
|
||||||
@@ -432,15 +426,7 @@ sub parseCommandLineArguments
|
|||||||
}
|
}
|
||||||
if ( $install{ 'dir' } )
|
if ( $install{ 'dir' } )
|
||||||
{
|
{
|
||||||
$CONFIG{ 'domaindir' } = $install{ 'dir' }.'/domains';
|
$CONFIG{ 'dir' } = $install{ 'dir' };
|
||||||
$CONFIG{ 'dir' } = undef;
|
|
||||||
$CONFIG{ 'lvm' } = undef;
|
|
||||||
delete $CONFIG{ 'lvm' };
|
|
||||||
}
|
|
||||||
if ( $install{ 'domaindir' } )
|
|
||||||
{
|
|
||||||
$CONFIG{ 'domaindir' } = $install{ 'domaindir' };
|
|
||||||
$CONFIG{ 'dir' } = undef;
|
|
||||||
$CONFIG{ 'lvm' } = undef;
|
$CONFIG{ 'lvm' } = undef;
|
||||||
delete $CONFIG{ 'lvm' };
|
delete $CONFIG{ 'lvm' };
|
||||||
}
|
}
|
||||||
@@ -507,20 +493,18 @@ EOF
|
|||||||
if ( defined( $CONFIG{ 'lvm' } ) && length( $CONFIG{ 'lvm' } ) );
|
if ( defined( $CONFIG{ 'lvm' } ) && length( $CONFIG{ 'lvm' } ) );
|
||||||
$options += 1
|
$options += 1
|
||||||
if ( defined( $CONFIG{ 'dir' } ) && length( $CONFIG{ 'dir' } ) );
|
if ( defined( $CONFIG{ 'dir' } ) && length( $CONFIG{ 'dir' } ) );
|
||||||
$options += 1
|
|
||||||
if ( defined( $CONFIG{ 'domaindir' } ) && length( $CONFIG{ 'domaindir' } ) );
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Report
|
# Report
|
||||||
#
|
#
|
||||||
if ( $options == 0 )
|
if ( $options == 0 )
|
||||||
{
|
{
|
||||||
print "Please specify one of --lvm, --domaindir or --dir\n";
|
print "Please specify one of --lvm or --dir\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
if ( $options > 1 )
|
if ( $options > 1 )
|
||||||
{
|
{
|
||||||
print "Please specify only one of --lvm, --domaindir or --dir - not several of them!\n";
|
print "Please specify only one of --lvm or --dir - not both!\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ xen-update-image - Update the software installed upon offline Xen images.
|
|||||||
--version Show the version number and exit.
|
--version Show the version number and exit.
|
||||||
|
|
||||||
General Options:
|
General Options:
|
||||||
--dir Specify the directory which contains the image(s). (old style)
|
--dir Specify the directory which contains the image(s).
|
||||||
--domaindir Specify the directory which contains the image(s). (new style)
|
|
||||||
--lvm Specify the LVM volume group which contains the image(s).
|
--lvm Specify the LVM volume group which contains the image(s).
|
||||||
--evms Specify the EVMS container which contains the image(s).
|
--evms Specify the EVMS container which contains the image(s).
|
||||||
|
|
||||||
@@ -28,14 +27,7 @@ xen-update-image - Update the software installed upon offline Xen images.
|
|||||||
=over 8
|
=over 8
|
||||||
|
|
||||||
=item B<--dir>
|
=item B<--dir>
|
||||||
Specify the directory which contains the image(s). Looks
|
Specify the directory which contains the image(s).
|
||||||
for directories named after the hostname in a subdirectory
|
|
||||||
"domains". (old style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--domaindir>
|
|
||||||
Specify the directory which contains the image(s). Looks
|
|
||||||
for directories named after the hostname directorly in this
|
|
||||||
directory. (new style, see xen-create-image(1) for details)
|
|
||||||
|
|
||||||
=item B<--evms>
|
=item B<--evms>
|
||||||
Specify the EVMS container which contains the image(s).
|
Specify the EVMS container which contains the image(s).
|
||||||
@@ -222,7 +214,7 @@ sub updateXenImage
|
|||||||
{
|
{
|
||||||
|
|
||||||
# The loopback image.
|
# The loopback image.
|
||||||
$img = $CONFIG{ 'domaindir' } . '/' . $name . "/disk.img";
|
$img = $CONFIG{ 'dir' } . "/domains/" . $name . "/disk.img";
|
||||||
|
|
||||||
if ( !-e $img )
|
if ( !-e $img )
|
||||||
{
|
{
|
||||||
@@ -446,7 +438,6 @@ sub parseCommandLineArguments
|
|||||||
# Parse options.
|
# Parse options.
|
||||||
#
|
#
|
||||||
GetOptions( "dir=s", \$CONFIG{ 'dir' }, "lvm=s", \$CONFIG{ 'lvm' },
|
GetOptions( "dir=s", \$CONFIG{ 'dir' }, "lvm=s", \$CONFIG{ 'lvm' },
|
||||||
"domaindir=s", \$CONFIG{ 'dir' },
|
|
||||||
"evms=s", \$CONFIG{ 'evms' }, "help", \$HELP,
|
"evms=s", \$CONFIG{ 'evms' }, "help", \$HELP,
|
||||||
"manual", \$MANUAL, "version", \$VERSION
|
"manual", \$MANUAL, "version", \$VERSION
|
||||||
);
|
);
|
||||||
@@ -466,11 +457,6 @@ sub parseCommandLineArguments
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($CONFIG{ 'dir' }) {
|
|
||||||
$CONFIG{ 'domaindir' } = $CONFIG{ 'dir' }.'/domains';
|
|
||||||
$CONFIG{ 'dir' } = undef;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -491,7 +477,7 @@ sub checkArguments
|
|||||||
# Make sure we got one and only one installation method.
|
# Make sure we got one and only one installation method.
|
||||||
#
|
#
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
foreach my $type (qw/dir domaindir lvm evms/)
|
foreach my $type (qw/dir lvm evms/)
|
||||||
{
|
{
|
||||||
$count += 1 if defined( $CONFIG{ $type } );
|
$count += 1 if defined( $CONFIG{ $type } );
|
||||||
}
|
}
|
||||||
@@ -504,7 +490,6 @@ sub checkArguments
|
|||||||
{
|
{
|
||||||
print "Please select one and only one of the installation methods:\n";
|
print "Please select one and only one of the installation methods:\n";
|
||||||
print " --dir\n";
|
print " --dir\n";
|
||||||
print " --domaindir\n";
|
|
||||||
print " --evms\n";
|
print " --evms\n";
|
||||||
print " --lvm\n";
|
print " --lvm\n";
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ sub createXenConfig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ENV{ 'image_prefix' } = "file:$ENV{'domaindir'}/$ENV{'hostname'}/";
|
$ENV{ 'image_prefix' } = "file:$ENV{'dir'}/domains/$ENV{'hostname'}/";
|
||||||
$ENV{ 'image_suffix' } = '.img';
|
$ENV{ 'image_suffix' } = '.img';
|
||||||
importPartitionsFromEnvironment();
|
importPartitionsFromEnvironment();
|
||||||
}
|
}
|
||||||
|
|||||||
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -41,8 +41,6 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low
|
|||||||
- Checks for debootstrap and cdebootstrap, uses debootstrap if both
|
- Checks for debootstrap and cdebootstrap, uses debootstrap if both
|
||||||
are installed (Changed "Depends: debootstrap" to "Depends:
|
are installed (Changed "Depends: debootstrap" to "Depends:
|
||||||
debootstrap | cdebootstrap" in debian/control)
|
debootstrap | cdebootstrap" in debian/control)
|
||||||
- Introduces the --domaindir option as alternative to --dir which
|
|
||||||
always appends "/domains/" to the path. (Closes: #477238)
|
|
||||||
* Removal of /etc/bash_completion.d/xm from the package since
|
* Removal of /etc/bash_completion.d/xm from the package since
|
||||||
bash-completion ships a more elaborate version of that file. (Closes:
|
bash-completion ships a more elaborate version of that file. (Closes:
|
||||||
#566683, #550590, LP: #538917, #484098)
|
#566683, #550590, LP: #538917, #484098)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function _find_xen_images
|
|||||||
#
|
#
|
||||||
_xen_create_image()
|
_xen_create_image()
|
||||||
{
|
{
|
||||||
local cur prev ip roles partitions dists vgs
|
local cur prev ip evmscontainers roles partitions dists vgs
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
@@ -158,7 +158,7 @@ complete -F _xen_create_image xen-create-image
|
|||||||
#
|
#
|
||||||
_xen_create_nfs()
|
_xen_create_nfs()
|
||||||
{
|
{
|
||||||
local cur prev ip roles dists vgs
|
local cur prev
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
@@ -208,6 +208,7 @@ _xen_delete_image()
|
|||||||
# Complete the options + all available hostnames.
|
# Complete the options + all available hostnames.
|
||||||
# Determine arguments dynamically. Avoids out-of-dateness.
|
# Determine arguments dynamically. Avoids out-of-dateness.
|
||||||
#
|
#
|
||||||
|
names=`_find_xen_images`
|
||||||
opts=$(xen-delete-image --help|grep -- --|awk '{print $1}'|grep -- -- | sort -u)
|
opts=$(xen-delete-image --help|grep -- --|awk '{print $1}'|grep -- -- | sort -u)
|
||||||
opts="${opts} ${names}"
|
opts="${opts} ${names}"
|
||||||
|
|
||||||
@@ -221,7 +222,6 @@ _xen_delete_image()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--hostname)
|
--hostname)
|
||||||
names=`_find_xen_images`
|
|
||||||
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@@ -251,7 +251,7 @@ complete -F _xen_delete_image xen-delete-image
|
|||||||
#
|
#
|
||||||
_xen_update_image()
|
_xen_update_image()
|
||||||
{
|
{
|
||||||
local cur prev opts base names vgs
|
local cur prev opts evmscontainers names vgs
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
@@ -303,7 +303,7 @@ complete -F _xen_update_image xen-update-image
|
|||||||
#
|
#
|
||||||
_xen_list_images()
|
_xen_list_images()
|
||||||
{
|
{
|
||||||
local cur prev opts vgs
|
local cur prev opts
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
@@ -325,7 +325,7 @@ complete -F _xen_list_images xen-list-images
|
|||||||
#
|
#
|
||||||
_xt-create-xen-config()
|
_xt-create-xen-config()
|
||||||
{
|
{
|
||||||
local cur prev
|
local cur prev opts
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
@@ -360,7 +360,7 @@ complete -F _xt-create-xen-config xt-create-xen-config
|
|||||||
#
|
#
|
||||||
_xt-customize-image()
|
_xt-customize-image()
|
||||||
{
|
{
|
||||||
local cur prev dists
|
local cur prev dists opts
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
@@ -401,7 +401,7 @@ complete -F _xt-customize-image xt-customize-image
|
|||||||
#
|
#
|
||||||
_xt-install-image()
|
_xt-install-image()
|
||||||
{
|
{
|
||||||
local cur prev dists
|
local cur prev dists opts
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
|||||||
Reference in New Issue
Block a user