From a02706be0a906cbc153322be92e8fe38cc4a022d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 18 Jul 2008 22:39:01 +0000 Subject: [PATCH] -Fix strict compliance for copycds git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1907 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/copycds.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/copycds.pm b/xCAT-server/lib/xcat/plugins/copycds.pm index 06894e3a6..3b0dd49a2 100644 --- a/xCAT-server/lib/xcat/plugins/copycds.pm +++ b/xCAT-server/lib/xcat/plugins/copycds.pm @@ -1,5 +1,7 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html package xCAT_plugin::copycds; +use strict; +use warnings; use Storable qw(dclone); use xCAT::Table; use Data::Dumper; @@ -43,13 +45,14 @@ sub process_request { 'a|arch=s' => \$arch ); if ($arch and $arch =~ /i.86/) { - $arch = x86; + $arch = 'x86'; } my @args = @ARGV; #copy ARGV unless ($#args >= 0) { $callback->({error=>"copycds needs at least one full path to ISO currently."}); return; } + my $file; foreach (@args) { unless (/^\//) { #If not an absolute path, concatenate with client specified cwd s/^/$request->{cwd}->[0]\//; @@ -97,7 +100,7 @@ sub process_request { $::CDMOUNTPATH=""; chdir($existdir); - while (wait() > 0) { yield; } #Make sure all children exit before trying umount + while (wait() > 0) { yield(); } #Make sure all children exit before trying umount system("umount /mnt/xcat"); unless ($identified) { $callback->({error=>["copycds could not identify the ISO supplied, you may wish to try -n "],errorcode=>[1]});