Server IP : 184.154.167.98 / Your IP : 18.116.47.194 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /sbin/ |
Upload File : |
#!/bin/bash # migrate from hybrid channel to normal channel # log=/var/log/hybrid-to-normal.log source /etc/normal-hybrid.conf HYB_REPO_FILE_BASE="$(basename ${HYB_REPO_FILE})" HYB_REPO_BETA_FILE_BASE="$(basename ${HYB_REPO_BETA_FILE})" if [[ $HYB_REPO_FILE_BASE == *"*"* ]] || [[ $HYB_REPO_FILE_BASE == *"?"* ]] || [[ $HYB_REPO_FILE_BASE == *"["* ]] || [[ $HYB_REPO_FILE_BASE == *"]"* ]] ; then echo "Error: HYB_REPO_FILE contains wildcard characters" exit 1 fi if [[ $HYB_REPO_BETA_FILE_BASE == *"*"* ]] || [[ $HYB_REPO_BETA_FILE_BASE == *"?"* ]] || [[ $HYB_REPO_BETA_FILE_BASE == *"["* ]] || [[ $HYB_REPO_BETA_FILE_BASE == *"]"* ]] ; then echo "Error: HYB_REPO_BETA_FILE contains wildcard characters" exit 1 fi HYB_REPO_FILE_PATH="/etc/yum.repos.d/${HYB_REPO_FILE_BASE}" HYB_REPO_BETA_FILE_PATH="/etc/yum.repos.d/${HYB_REPO_BETA_FILE_BASE}" yum list installed kernel-*el${VERSION_NUM}h* &> /dev/null kern=$? yum list installed kmod-lve &> /dev/null kmodlve=$? if [ $kern -eq 1 -a $kmodlve -eq 1 ]; then echo "CloudLinux ${VERSION_NUM} Hybrid has been uninstalled already" exit 0 fi if [ -f "${HYB_REPO_FILE_PATH}" ] || [ -f "${HYB_REPO_BETA_FILE_PATH}" ] ; then echo "Renaming CloudLinux ${VERSION_NUM} hybrid repositories..." | tee -a $log sed -i 's/enabled=1/enabled=0/g' "${HYB_REPO_FILE_PATH}" sed -i 's/enabled=1/enabled=0/g' "${HYB_REPO_BETA_FILE_PATH}" mv "${HYB_REPO_FILE_PATH}" "${HYB_REPO_FILE_PATH}".backup mv "${HYB_REPO_BETA_FILE_PATH}" "${HYB_REPO_BETA_FILE_PATH}".backup yum clean all 2>&1 | tee -a $log fi if [ $kern -eq 0 ]; then yum -y downgrade kernel-"$(cat /etc/sysconfig/kernel-version.pre-hybrid)" 2>&1 | tee -a $log fi rpm --nodeps -ev `rpm -qa kernel kernel-* kmod-lve | grep ${VERSION_NUM}h` 2>&1 | tee -a $log yum list installed kmod-*el${VERSION_NUM}h* &> /dev/null if [ $? -eq 0 ]; then yum -y downgrade kmod fi if [ ${VERSION_NUM} -eq 7 ]; then yum list installed dracut-*el7h* &> /dev/null if [ $? -eq 0 ]; then rpm --nodeps -ev dracut-squash 2>&1 | tee -a $log yum -y downgrade kexec-tools dracut dracut-network dracut-config-rescue fi fi