1
0
mirror of synced 2026-02-15 03:36:08 +00:00

2007-06-19 22:35:34 by steve

Search for template files in /etc/xen-tools.conf.
This commit is contained in:
steve
2007-06-19 22:35:34 +00:00
parent 1566828f3a
commit cb593a0e09

View File

@@ -563,7 +563,7 @@ Install an X11 server, using VNC and XDM
--
http://www.steve.org.uk/
$Id: xen-create-image,v 1.157 2007-06-19 10:44:24 steve Exp $
$Id: xen-create-image,v 1.158 2007-06-19 22:35:34 steve Exp $
=cut
@@ -1239,7 +1239,7 @@ sub parseCommandLineArguments
if ( $VERSION )
{
my $REVISION = '$Revision: 1.157 $';
my $REVISION = '$Revision: 1.158 $';
if ( $REVISION =~ /1.([0-9.]+) / )
{
$REVISION = $1;
@@ -1459,12 +1459,24 @@ EOF
#
# Make sure that any specified template file exists.
#
if ( ( defined( $CONFIG{'template'} ) ) &&
( length( $CONFIG{'template'} ) ) &&
( ! -e $CONFIG{'template'} ) )
if ( defined( $CONFIG{'template'} ) &&
length( $CONFIG{'template'} ) )
{
logprint( "The specified template file, $CONFIG{'template'}, does not exist.\n" );
exit 1;
if ( -e $CONFIG{'template'} )
{
# nop
}
elsif ( -e "/etc/xen-tools/$CONFIG{'template'}" )
{
$CONFIG{'template'} = "/etc/xen-tools/$CONFIG{'template'}";
}
else
{
# failed to find either by fully qualified path,
# or inside /etc/xen-tools.
logprint( "The specified template file, $CONFIG{'template'}, does not exist.\n" );
exit 1;
}
}