Fix a fatal typo in the conserver plugin, make copycds work with relative path to ISO files
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@239 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -5,6 +5,7 @@ BEGIN
 | 
			
		||||
    $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
 | 
			
		||||
}
 | 
			
		||||
use lib "$::XCATROOT/lib/perl";
 | 
			
		||||
use Cwd;
 | 
			
		||||
use IO::Socket::SSL;
 | 
			
		||||
use IO::Socket::INET;
 | 
			
		||||
use File::Basename;
 | 
			
		||||
@@ -27,6 +28,7 @@ if($bname =~ /xcatclient/) {
 | 
			
		||||
  printf("Bad usage\n");
 | 
			
		||||
  exit(1);
 | 
			
		||||
}
 | 
			
		||||
$cmdref->{cwd}->[0] = cwd();
 | 
			
		||||
 | 
			
		||||
if (-p STDIN) {
 | 
			
		||||
  my $data;
 | 
			
		||||
 
 | 
			
		||||
@@ -32,9 +32,6 @@ sub docfheaders {
 | 
			
		||||
    push @$content,"  sslcredentials /etc/xcat/cert/server-cred.pem;\n";
 | 
			
		||||
    push @$content,"}\n";
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  unless (grep(/^default full/,@meat)) {
 | 
			
		||||
    push @$content,"default full { rw *; }\n";
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -43,8 +43,11 @@ sub process_request {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  foreach (@args) {
 | 
			
		||||
    unless (/^\//) { #If not an absolute path, concatenate with client specified cwd
 | 
			
		||||
	s/^/$request->{cwd}->[0]\//;
 | 
			
		||||
    }
 | 
			
		||||
    unless (-r $_ and -f $_) {
 | 
			
		||||
      $callback->({error=>"copycds currently only understands FULL path to iso files, $_ not processed"});
 | 
			
		||||
      $callback->({error=>"The management server was unable to find/read $_, ensure that file exists on the server at specified location"});
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    mkdir "/mnt/xcat";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user