mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
为 VMware 环境只启动时同步一次时间
This commit is contained in:
parent
16b6a486de
commit
6764629b97
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user