If mirrorlist2 is empty, populate

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2017-11-23 01:50:05 +00:00
parent 6ca79cbfa3
commit cf97e949ad

View file

@ -6,6 +6,11 @@
# Initial expected state is mirrorlist1 running, mirrorlist2 not running and new pkl
if [ ! -f /srv/mirrorlist/data/mirrorlist2/global_netblocks.txt ];
then
cp /srv/mirrorlist/data/mirrorlist1/* srv/mirrorlist/data/mirrorlist2/
fi
## Check that pkl is newer than old pkl
if [ /srv/mirrorlist/data/mirrorlist1/mirrorlist_cache.pkl -nt /srv/mirrorlist/data/mirrorlist2/mirrorlist_cache.pkl ]; then
# new pkl