I run this script to build a list of installed programs and it builds a cmd script to reinstall them.
It would probably be better to set it all in one install as some of the installs will have the others as dependencies and therefore will already be installed before the script hits that install but it then just says it is already installed at the latest version.
I then rename /usr and /etc and run the yum bootstrap (p4) and run the script created above.
It takes one argument, the name you want to call the script.
/* REXX to get just package names from RPM installed output */
rc = SysLoadFuncs()
Parse Arg fileout
rc = SysFileDelete(fileout)
fileinv = holdrpm.txt
address cmd 'yum list |grep install >'fileinv
do while Lines(fileinv)
text = LineIn(fileinv)
parse var text package'.'.
rc = Lineout(fileout,'yum install -y 'package)
end
rc = SysFileDelete(fileinv)
I have not used the output but this makes one install line:
/* REXX to get just package names from RPM installed output */
rc = SysLoadFuncs()
Parse Arg fileout
rc = SysFileDelete(fileout)
fileinv = holdrpm.txt
address cmd 'yum list |grep install >'fileinv
list = ''
do while Lines(fileinv)
text = LineIn(fileinv)
parse var text package'.'.
list = list || ' ' || package
end
rc = Lineout(fileout,'yum install -y 'list)
rc = SysFileDelete(fileinv)