diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 8d4e01ac6..645ec7535 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -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' diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index be9285703..74c1d4ceb 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -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"; diff --git a/xCAT-server/share/xcat/netboot/sles/genimage.yum b/xCAT-server/share/xcat/netboot/sles/genimage.yum index edd255fca..b55cbe286 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage.yum +++ b/xCAT-server/share/xcat/netboot/sles/genimage.yum @@ -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"; diff --git a/xCAT-server/share/xcat/netboot/suse/genimage b/xCAT-server/share/xcat/netboot/suse/genimage index b1df60742..715982fa7 100755 --- a/xCAT-server/share/xcat/netboot/suse/genimage +++ b/xCAT-server/share/xcat/netboot/suse/genimage @@ -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";