diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index f066e370d..6a4166388 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -189,7 +189,11 @@ sub copycd GetOptions( 'n=s' => \$distname, 'a=s' => \$arch, + 'p=s' => \$copypath, 'm=s' => \$path, + 'i' => \$inspection, + 'o' => \$noosimage, + 'w' => \$nonoverwrite, ); unless ($path) { @@ -197,6 +201,11 @@ sub copycd #this plugin needs $path... return; } + + if ( $copypath || $noosimage || $nonoverwrite ){ + $callback->({info=> ["copycd on debian/ubuntu doesn't support -p, -o, -w options!"]}); + return; + } unless (-r $path . "/.disk/info") { @@ -210,6 +219,13 @@ sub copycd my @line2 = split(/ /,$line); close($dinfo); + #read the cd_type for the inspection + my $cdtype; + open($dinfo, $path . "/.disk/cd_type"); + $cdtype = <$dinfo>; + chomp($line); + close($dinfo); + my $isnetinst = 0; my $prod = $line2[0]; # The product should be the first word my $ver = $line2[1]; # The version should be the second word @@ -269,7 +285,7 @@ sub copycd { $arch = $darch; } - if ($arch and $arch ne $darch) + if ($arch and ($arch ne $darch) and ($arch ne $debarch)) { $callback->( { @@ -281,6 +297,15 @@ sub copycd return; } } + if ( $inspection ){ + $callback->( + { + info => + "DISTNAME:$distname\n"."ARCH:$debarch\n"."DISCTYPE:$cdtype\n" + } + ); + return; + } %{$request} = (); #clear request we've got it. $callback->(