From 88bf8a483c3593ab4d1a2f020ed81d7d325268d7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 10 Jan 2008 13:41:31 +0000 Subject: [PATCH] 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 --- xCAT-client-2.0/bin/xcatclient | 2 ++ xCAT-server-2.0/lib/xcat/plugins/conserver.pm | 3 --- xCAT-server-2.0/lib/xcat/plugins/copycds.pm | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-client-2.0/bin/xcatclient b/xCAT-client-2.0/bin/xcatclient index 225828d07..aef4f4522 100755 --- a/xCAT-client-2.0/bin/xcatclient +++ b/xCAT-client-2.0/bin/xcatclient @@ -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; diff --git a/xCAT-server-2.0/lib/xcat/plugins/conserver.pm b/xCAT-server-2.0/lib/xcat/plugins/conserver.pm index ace9411eb..43fa3c555 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/conserver.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/conserver.pm @@ -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"; } diff --git a/xCAT-server-2.0/lib/xcat/plugins/copycds.pm b/xCAT-server-2.0/lib/xcat/plugins/copycds.pm index dd3c1acdb..c7bd0f0b6 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/copycds.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/copycds.pm @@ -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";