1pre_install() { 2 if [[ $INSTALL_TSOCKS == true ]]; then 3 # tsocks package is not available in latest fedora releases, so don't exit in case 4 # installation failed. 5 install tsocks || echo "Installation of the tsocks package failed, proxy may not be available" 6 fi 7 8 if [[ $ID == centos || $ID == rocky ]] && [[ $VERSION_ID == 8* ]]; then 9 sudo "$package_manager" update -y --refresh 10 elif [[ $ID == centos ]] && ((VERSION_ID == 7)); then 11 install nbd || { 12 install wget 13 wget -O nbd.rpm https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/n/nbd-3.24-1.el7.x86_64.rpm 14 install nbd.rpm 15 } 16 fi 17} 18