Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
3320be7a16 update 2025-09-02 17:43:25 2025-09-02 17:43:25 +08:00
Ing
efd1d3d291 优化 curl 命令,强制使用 HTTP/1.1 以提高兼容性 2025-08-27 11:36:14 +08:00
Ing
bd5e688f7e Refactor code structure for improved readability and maintainability 2025-08-22 21:25:38 +08:00
21 changed files with 4063 additions and 3932 deletions

View File

@ -1 +1 @@
25.8.1 25.9.0

View File

@ -8,7 +8,7 @@
# shellcheck disable=SC2034 # shellcheck disable=SC2034
RR_VERSION="25.8.1" RR_VERSION="25.9.0"
RR_RELEASE="" RR_RELEASE=""
RR_TITLE="RR v${RR_VERSION}" RR_TITLE="RR v${RR_VERSION}"

View File

@ -132,13 +132,14 @@ BUSLIST="usb sata sas scsi nvme mmc ide virtio vmbus xen"
if [ "${BUS}" = "usb" ]; then if [ "${BUS}" = "usb" ]; then
VID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | grep "ID_VENDOR_ID" | cut -d= -f2)" VID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | grep "ID_VENDOR_ID" | cut -d= -f2)"
PID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | grep "ID_MODEL_ID" | cut -d= -f2)" PID="0x$(udevadm info --query property --name "${LOADER_DISK}" 2>/dev/null | grep "ID_MODEL_ID" | cut -d= -f2)"
[ "${VID}" = "0x" ] || [ "${PID}" = "0x" ] && die "$(TEXT "The loader disk does not support the current USB Portable Hard Disk.")"
TYPE="flashdisk" TYPE="flashdisk"
elif ! echo "${BUSLIST}" | grep -wq "${BUS}"; then elif ! echo "${BUSLIST}" | grep -wq "${BUS}"; then
if [ "LOCALBUILD" = "${LOADER_DISK}" ]; then if [ "LOCALBUILD" = "${LOADER_DISK}" ]; then
echo "LOCALBUILD MODE" echo "LOCALBUILD MODE"
TYPE="PC" TYPE="PC"
else else
die "$(printf "$(TEXT "The boot disk does not support the current %s, only %s DoM is supported.")" "${BUS}" "${BUSLIST// /\/}")" die "$(printf "$(TEXT "The loader disk does not support the current %s, only %s DoM is supported.")" "${BUS}" "${BUSLIST// /\/}")"
fi fi
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1240,7 +1240,7 @@ function getSynoExtractor() {
echo "$(TEXT "Downloading old pat to extract synology .pat extractor...")" echo "$(TEXT "Downloading old pat to extract synology .pat extractor...")"
rm -f "${OLDPAT_PATH}" rm -f "${OLDPAT_PATH}"
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${OLDPAT_URL}" -o "${OLDPAT_PATH}") STATUS=$(curl -kL --http1.1 --connect-timeout 10 -w "%{http_code}" "${OLDPAT_URL}" -o "${OLDPAT_PATH}")
RET=$? RET=$?
if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then
rm -f "${OLDPAT_PATH}" rm -f "${OLDPAT_PATH}"
@ -1382,13 +1382,13 @@ function extractDsmFiles() {
# Check disk space left # Check disk space left
SPACELEFT=$(df --block-size=1 "${PART3_PATH}" 2>/dev/null | awk 'NR==2 {print $4}') SPACELEFT=$(df --block-size=1 "${PART3_PATH}" 2>/dev/null | awk 'NR==2 {print $4}')
# Discover remote file size # Discover remote file size
FILESIZE=$(curl -skLI --connect-timeout 10 "${PATURL}" | grep -i Content-Length | tail -n 1 | tr -d '\r\n' | awk '{print $2}') FILESIZE=$(curl -skLI --http1.1 --connect-timeout 10 "${PATURL}" | grep -i Content-Length | tail -n 1 | tr -d '\r\n' | awk '{print $2}')
if [ ${FILESIZE:-0} -ge ${SPACELEFT:-0} ]; then if [ ${FILESIZE:-0} -ge ${SPACELEFT:-0} ]; then
# No disk space to download, change it to RAMDISK # No disk space to download, change it to RAMDISK
PAT_PATH="${TMP_PATH}/${PAT_FILE}" PAT_PATH="${TMP_PATH}/${PAT_FILE}"
fi fi
touch "${PAT_PATH}.downloading" touch "${PAT_PATH}.downloading"
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${PATURL}" -o "${PAT_PATH}") STATUS=$(curl -kL --http1.1 --connect-timeout 10 -w "%{http_code}" "${PATURL}" -o "${PAT_PATH}")
RET=$? RET=$?
rm -f "${PAT_PATH}.downloading" rm -f "${PAT_PATH}.downloading"
if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then if [ ${RET} -ne 0 ] || [ ${STATUS:-0} -ne 200 ]; then

View File

@ -1 +1 @@
25.8.1 25.9.0