From b5f73f7a23f5f9677d79c5947b262b1d0fea2e79 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 29 Mar 2013 03:44:57 +0000 Subject: [PATCH] copycds support option -i on debian/ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15718 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/debian.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 6a4166388..c6e5583d1 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -219,13 +219,6 @@ 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 @@ -237,11 +230,13 @@ sub copycd return; } + my $discno = ''; if ( $prod eq "Debian") { # Debian specific, the arch and version are in different places $darch = $line2[6]; $ver = $line2[2]; + $discno = $line2[8]; # For the purpose of copying the netinst cd before the main one # So that we have the netboot images @@ -257,6 +252,7 @@ sub copycd $distname="ubuntu".$ver; $detdistname="ubuntu".$ver; + $discno = `cat $path/README.diskdefines | grep 'DISKNUM ' | awk '{print \$3}'`; } else { @@ -301,7 +297,7 @@ sub copycd $callback->( { info => - "DISTNAME:$distname\n"."ARCH:$debarch\n"."DISCTYPE:$cdtype\n" + "DISTNAME:$distname\n"."ARCH:$debarch\n"."DISCNO:$discno\n" } ); return;