#!/bin/bash # Script to dump rpm info and sync it to # rpms.hpc.lsu.edu dest='rpms.si.hpc.lsu.edu' host=$(hostname -f) dt=$(date '+%Y%m%d') suffix="${dt}.txt" dt=$(date '+%Y%m%d:%H:%M') echo "# ${dt}" > /tmp/rpms-${suffix} echo "# ${dt}" > /tmp/updates-${suffix} rpm -qa | sort >> /tmp/rpms-${suffix} yum check-update >> /tmp/updates-${suffix} gzip /tmp/rpms-${suffix} gzip /tmp/updates-${suffix} rsync -4 /tmp/rpms-${suffix}.gz rsync://${dest}/rpms-${host}/ rsync -4 /tmp/updates-${suffix}.gz rsync://${dest}/rpms-${host}/