fix bug 'mkvm cannot get profile if relative path is specified', sourceforge bug ID 2792460

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3412 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhanx 2009-05-20 10:04:04 +00:00
parent e24e85831f
commit 212032247f

View File

@ -256,7 +256,7 @@ sub mkvm_parse_args {
# Read and check profile
####################################
if ( exists( $opt{p})) {
$opt{p} = $request->{cwd}->[0] . $opt{p} if ( $opt{p} !~ /^\//);
$opt{p} = $request->{cwd}->[0] . '/' . $opt{p} if ( $opt{p} !~ /^\//);
return ( usage( "Profile $opt{p} cannot be found")) if ( ! -f $opt{p});
open (PROFFILE, "<$opt{p}") or return ( usage( "Cannot open profile $opt{p}"));
my @cfgdata = ();