I wrote a script which along other tasks connects to a remote server and pulls a list of all installed packages and installs them, Like so:
echo -e "\e[36m#===# Getting list of packages to install #===#\e[0m"
$ssh root@$srv 'rpm -qa --queryformat "%{NAME}\n" >/tmp/sw.lst'
$scp root@$srv:/tmp/sw.lst /tmp/
np=`cat /tmp/sw.lst |wc -l`
echo -e "\e[36m#===# $np Packages are going to be installed! #===#\e[0m"
/usr/bin/xargs yum -y install < /tmp/sw.lst
My problem is that when it runs through the list it skips many packages which came with the default installation and i'm trying to save that time, is that possible?