#!/bin/bash
#
# Script to rsync netboot images to PXE

# Variables
#
OPT=varhP

#################################################################
# CentOS							#
#################################################################

# 7
echo -e "\nCentOS 7\n"
rsync -$OPT --delete --exclude="README*" \
/mirror/mirror.centos.org/7/os/x86_64/images/pxeboot/ \
/var/lib/tftpboot/CentOS/7/x86_64/

#################################################################


#################################################################
# Rocky								#
#################################################################

# 8
echo -e "\nRocky 8\n"
rsync -$OPT --delete --exclude="README*" \
/mirror/rocky/8/BaseOS/x86_64/os/images/pxeboot/ \
/var/lib/tftpboot/Rocky/8/x86_64/

#################################################################


# Clean-up
#
unset OPT

exit 0
