add zypper/yum update cmds to genimage to update all sw when running genimage against an existing image
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5408 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -295,6 +295,7 @@ unless ($onlyinitrd) {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      #enable extra package repo
 | 
			
		||||
      my $yumcmd_base = $yumcmd;
 | 
			
		||||
      $yumcmd .= "install ";
 | 
			
		||||
      #append extra pkg names to yum command 
 | 
			
		||||
      if ($extrapkgnames) {
 | 
			
		||||
@@ -321,6 +322,14 @@ unless ($onlyinitrd) {
 | 
			
		||||
	      $rc = system("$yumcmd_remove $rm_packges");
 | 
			
		||||
	  }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      # run zypper update to update any installed rpms
 | 
			
		||||
      # needed when running genimage again after updating software in repositories
 | 
			
		||||
      my $yumcmd_update = $yumcmd_base . " update  ";
 | 
			
		||||
      $rc = system("$yumcmd_update");
 | 
			
		||||
      # ignore any return code
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   postscripts(); #run 'postscripts'
 | 
			
		||||
 
 | 
			
		||||
@@ -395,6 +395,12 @@ unless ($onlyinitrd) {
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   # run zypper update to update any installed rpms
 | 
			
		||||
   # needed when running genimage again after updating software in repositories
 | 
			
		||||
   my $yumcmd_update = "zypper -R $rootimg_dir update  "; 
 | 
			
		||||
   $rc = system("$yumcmd_update");
 | 
			
		||||
   # ignore any return code
 | 
			
		||||
 | 
			
		||||
   postscripts(); #run 'postscripts'
 | 
			
		||||
}
 | 
			
		||||
unlink "/tmp/genimage.$$.yum.conf";
 | 
			
		||||
 
 | 
			
		||||
@@ -163,6 +163,14 @@ unless ($onlyinitrd) {
 | 
			
		||||
      print "zypper invocation failed\n";
 | 
			
		||||
      exit 1;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   # run zypper update to update any installed rpms
 | 
			
		||||
   # needed when running genimage again after updating software in repositories
 | 
			
		||||
   my $yumcmd_update = "zypper -R $rootimg_dir update  ";
 | 
			
		||||
   $rc = system("$yumcmd_update");
 | 
			
		||||
   # ignore any return code
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   postscripts(); #run 'postscripts'
 | 
			
		||||
}
 | 
			
		||||
unlink "/tmp/genimage.$$.yum.conf";
 | 
			
		||||
 
 | 
			
		||||
@@ -358,6 +358,13 @@ unless ($onlyinitrd) {
 | 
			
		||||
	   $rc = system("$yumcmd_remove $rm_packges");
 | 
			
		||||
       }
 | 
			
		||||
 | 
			
		||||
   # run zypper update to update any installed rpms
 | 
			
		||||
   # needed when running genimage again after updating software in repositories
 | 
			
		||||
   my $yumcmd_update = "zypper -R $rootimg_dir update  ";
 | 
			
		||||
   $rc = system("$yumcmd_update");
 | 
			
		||||
   # ignore any return code
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   postscripts(); #run 'postscripts'
 | 
			
		||||
}
 | 
			
		||||
unlink "/tmp/genimage.$$.yum.conf";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user