From 6764629b978f4e8a8598ca41c21bcce14fb5b100 Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 16 May 2025 15:41:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=20VMware=20=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=AA=E5=90=AF=E5=8A=A8=E6=97=B6=E5=90=8C=E6=AD=A5=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/initrd/opt/rr/boot.sh | 4 ++-- files/initrd/opt/rr/init.sh | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index ab41546a..e2dc4fcf 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -441,10 +441,10 @@ else echo "${IP}" | grep -q "^169\.254\." && IP="" [ -n "${IP}" ] && URL="http://${IP}:5000" || URL="http://find.synology.com/" python3 "${WORK_PATH}/include/functions.py" "makeqr" -d "${URL}" -l "6" -o "${TMP_PATH}/qrcode_boot.png" - [ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true + [ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>&1 || true python3 "${WORK_PATH}/include/functions.py" "makeqr" -f "${WORK_PATH}/include/qhxg.png" -l "7" -o "${TMP_PATH}/qrcode_qhxg.png" - [ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>/dev/null || true + [ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>&1 || true fi # Executes DSM kernel via KEXEC diff --git a/files/initrd/opt/rr/init.sh b/files/initrd/opt/rr/init.sh index 5f68d4d4..1e9a76a2 100755 --- a/files/initrd/opt/rr/init.sh +++ b/files/initrd/opt/rr/init.sh @@ -12,10 +12,13 @@ set -e . "${WORK_PATH}/include/functions.sh" . "${WORK_PATH}/include/addons.sh" -if type -p vmware-toolbox-cmd; then - if [ ! "Enabled" = "$(vmware-toolbox-cmd timesync status 2>/dev/null)" ]; then +if type vmware-toolbox-cmd >/dev/null 2>&1; then + if [ "Disable" = "$(vmware-toolbox-cmd timesync status 2>/dev/null)" ]; then vmware-toolbox-cmd timesync enable >/dev/null 2>&1 || true fi + if [ "Enabled" = "$(vmware-toolbox-cmd timesync status 2>/dev/null)" ]; then + vmware-toolbox-cmd timesync disable >/dev/null 2>&1 || true + fi fi [ -z "${LOADER_DISK}" ] && die "$(TEXT "Loader is not init!")" @@ -251,10 +254,10 @@ if [ "${DSMLOGO}" = "true" ] && [ -c "/dev/fb0" ] && [ ! "LOCALBUILD" = "${LOADE echo "${IP}" | grep -q "^169\.254\." && IP="" [ -n "${IP}" ] && URL="http://${IP}:${TTYD:-7681}" || URL="http://rr:${TTYD:-7681}" python3 "${WORK_PATH}/include/functions.py" makeqr -d "${URL}" -l "0" -o "${TMP_PATH}/qrcode_init.png" - [ -f "${TMP_PATH}/qrcode_init.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_init.png" >/dev/null 2>/dev/null || true + [ -f "${TMP_PATH}/qrcode_init.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_init.png" >/dev/null 2>&1 || true python3 "${WORK_PATH}/include/functions.py" makeqr -f "${WORK_PATH}/include/qhxg.png" -l "7" -o "${TMP_PATH}/qrcode_qhxg.png" - [ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>/dev/null || true + [ -f "${TMP_PATH}/qrcode_qhxg.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_qhxg.png" >/dev/null 2>&1 || true fi # Check memory