From f57fd01c3da251e4e6cd70d5518723b4b397ff02 Mon Sep 17 00:00:00 2001 From: cxhong Date: Thu, 30 Jul 2020 13:54:15 -0400 Subject: [PATCH] Generate local repository template if not exist or empty --- xCAT-server/lib/xcat/plugins/anaconda.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 10e586dab..e27ee05a0 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1135,11 +1135,10 @@ sub mkinstall my @pkgdirs=split(/,/,$pkgdir); foreach my $mypkgdir (@pkgdirs){ - unless(-f "/install/postscripts/repos/$mypkgdir/local-repository.tmpl"){ - #fix issue #2856@github - #for the osimages created by <=xCAT 2.12.3 + unless(-s "/install/postscripts/repos/$mypkgdir/local-repository.tmpl"){ #there is no local-repository.tmpl under pkgdir created on copycds - #generate local-repository.tmpl here if it does not exist + #generate local-repository.tmpl here if it does not exist or empty + xCAT::MsgUtils->trace($verbose_on_off, "d", "anaconda->mkinstall: call to create /install/postscripts/repos/$mypkgdir/local-repository.tmpl"); xCAT::Yum->localize_yumrepo($mypkgdir, $os, $arch); } }