From 57c53ba53381861423bfd462a7f206158543502c Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 15 Oct 2013 15:36:23 +0800 Subject: [PATCH] copycds supports sles12 --- xCAT-server/lib/xcat/plugins/sles.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index a66573dfc..3fb45e46f 100755 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -1645,6 +1645,9 @@ sub copycd if (not $darch and m/^BASEARCHS\s+(\S+)/) { $darch = $1; } + if (not $darch and m/^REPOID.*\/(\S+)/) { + $darch = $1; + } } close($dinfo); unless ($darch) @@ -1672,7 +1675,7 @@ sub copycd my $prod = <$mfile>; close($mfile); - if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/) + if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/ || $prod =~ m/SLES/) { if (-f "$mntpath/content") { my $content; @@ -1685,6 +1688,12 @@ sub copycd $detdistname = "sles".$verpair[1]; unless ($distname) { $distname = $detdistname; } } + unless ($distname) { + if (/^DISTRO/) { + $_ =~ /sles:(\d+),/; + $distname = "sles".$1; + } + } } } else { my @parts = split /\s+/, $prod;