mirror of
				https://gitee.com/SuperManito/LinuxMirrors
				synced 2025-11-04 08:20:28 +08:00 
			
		
		
		
	优化
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
## Author: SuperManito
 | 
					## Author: SuperManito
 | 
				
			||||||
## Modified: 2025-07-26
 | 
					## Modified: 2025-08-03
 | 
				
			||||||
## License: MIT
 | 
					## License: MIT
 | 
				
			||||||
## GitHub: https://github.com/SuperManito/LinuxMirrors
 | 
					## GitHub: https://github.com/SuperManito/LinuxMirrors
 | 
				
			||||||
## Website: https://linuxmirrors.cn
 | 
					## Website: https://linuxmirrors.cn
 | 
				
			||||||
@@ -128,6 +128,7 @@ File_DebianVersion=/etc/debian_version
 | 
				
			|||||||
File_ArmbianRelease=/etc/armbian-release
 | 
					File_ArmbianRelease=/etc/armbian-release
 | 
				
			||||||
File_RaspberryPiOSRelease=/etc/rpi-issue
 | 
					File_RaspberryPiOSRelease=/etc/rpi-issue
 | 
				
			||||||
File_openEulerRelease=/etc/openEuler-release
 | 
					File_openEulerRelease=/etc/openEuler-release
 | 
				
			||||||
 | 
					File_HuaweiCloudEulerOSRelease=/etc/hce-release
 | 
				
			||||||
File_OpenCloudOSRelease=/etc/opencloudos-release
 | 
					File_OpenCloudOSRelease=/etc/opencloudos-release
 | 
				
			||||||
File_AnolisOSRelease=/etc/anolis-release
 | 
					File_AnolisOSRelease=/etc/anolis-release
 | 
				
			||||||
File_OracleLinuxRelease=/etc/oracle-release
 | 
					File_OracleLinuxRelease=/etc/oracle-release
 | 
				
			||||||
@@ -465,7 +466,7 @@ function collect_system_info() {
 | 
				
			|||||||
        SYSTEM_FACTIONS="${SYSTEM_DEBIAN}"
 | 
					        SYSTEM_FACTIONS="${SYSTEM_DEBIAN}"
 | 
				
			||||||
    elif [ -s "${File_RedHatRelease}" ]; then
 | 
					    elif [ -s "${File_RedHatRelease}" ]; then
 | 
				
			||||||
        SYSTEM_FACTIONS="${SYSTEM_REDHAT}"
 | 
					        SYSTEM_FACTIONS="${SYSTEM_REDHAT}"
 | 
				
			||||||
    elif [ -s "${File_openEulerRelease}" ]; then
 | 
					    elif [ -s "${File_openEulerRelease}" ] || [ -s "${File_HuaweiCloudEulerOSRelease}" ]; then
 | 
				
			||||||
        SYSTEM_FACTIONS="${SYSTEM_OPENEULER}"
 | 
					        SYSTEM_FACTIONS="${SYSTEM_OPENEULER}"
 | 
				
			||||||
    elif [ -s "${File_OpenCloudOSRelease}" ]; then
 | 
					    elif [ -s "${File_OpenCloudOSRelease}" ]; then
 | 
				
			||||||
        SYSTEM_FACTIONS="${SYSTEM_OPENCLOUDOS}" # 自 9.0 版本起不再基于红帽
 | 
					        SYSTEM_FACTIONS="${SYSTEM_OPENCLOUDOS}" # 自 9.0 版本起不再基于红帽
 | 
				
			||||||
@@ -984,11 +985,26 @@ function configure_docker_ce_mirror() {
 | 
				
			|||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            *)
 | 
					            *)
 | 
				
			||||||
                target_version="8" # 注:部分系统使用9版本分支会有兼容性问题
 | 
					                target_version="8" # 注:部分系统使用9版本分支会有兼容性问题
 | 
				
			||||||
                # 适配国产系统
 | 
					                ## 适配国产操作系统
 | 
				
			||||||
                if [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_OPENEULER}" ]] && [[ "${SYSTEM_VERSION_ID_MAJOR}" == 23 ]]; then
 | 
					                if [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_OPENEULER}" ]] && [[ "${SYSTEM_VERSION_ID_MAJOR}" == 23 ]]; then
 | 
				
			||||||
                    target_version="9"
 | 
					                    target_version="9"
 | 
				
			||||||
                elif [[ "${SYSTEM_JUDGMENT}" == "${SYSTEM_OPENEULER}" ]] && [[ "${SYSTEM_VERSION_ID_MAJOR}" -ge 22 ]]; then
 | 
					                elif [[ "${SYSTEM_JUDGMENT}" == "${SYSTEM_OPENEULER}" ]]; then
 | 
				
			||||||
                    target_version="9"
 | 
					                    if [ -s "${File_HuaweiCloudEulerOSRelease}" ]; then
 | 
				
			||||||
 | 
					                        # Huawei Cloud EulerOS
 | 
				
			||||||
 | 
					                        case "${SYSTEM_VERSION_ID_MAJOR}" in
 | 
				
			||||||
 | 
					                        1)
 | 
				
			||||||
 | 
					                            target_version="8"
 | 
				
			||||||
 | 
					                            ;;
 | 
				
			||||||
 | 
					                        2)
 | 
				
			||||||
 | 
					                            target_version="9"
 | 
				
			||||||
 | 
					                            ;;
 | 
				
			||||||
 | 
					                        esac
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                        # openEuler
 | 
				
			||||||
 | 
					                        if [[ "${SYSTEM_VERSION_ID_MAJOR}" -ge 22 ]]; then
 | 
				
			||||||
 | 
					                            target_version="9"
 | 
				
			||||||
 | 
					                        fi
 | 
				
			||||||
 | 
					                    fi
 | 
				
			||||||
                fi
 | 
					                fi
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
            esac
 | 
					            esac
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user