Warn about Agent version

Warn about Agent version
This commit is contained in:
Kroese 2023-04-17 03:38:19 +02:00 committed by GitHub
commit eb4dae20ce
2 changed files with 11 additions and 3 deletions

View File

@ -80,6 +80,14 @@ if [ ! -f "${DATA}" ]; then
fi fi
AGENT="${STORAGE}/${BASE}.agent"
[ ! -f "$AGENT" ] && echo "1" > "$AGENT"
AGENT_VERSION=$(cat "${AGENT}")
if ((AGENT_VERSION < 3)); then
echo "INFO: The installed Guest Agent in DSM is an outdated version, please upgrade it."
fi
KVM_DISK_OPTS="\ KVM_DISK_OPTS="\
-device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \ -device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \
-drive file=${BOOT},if=none,id=drive-synoboot,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on \ -drive file=${BOOT},if=none,id=drive-synoboot,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on \

View File

@ -49,9 +49,9 @@ _graceful_shutdown(){
echo echo
echo "Could not send shutdown command to guest, error: $RESPONSE" echo "Could not send shutdown command to guest, error: $RESPONSE"
FILE="${STORAGE}/${BASE}.agent" AGENT="${STORAGE}/${BASE}.agent"
[ ! -f "$FILE" ] && echo "1" > "$FILE" [ ! -f "$AGENT" ] && echo "1" > "$AGENT"
AGENT_VERSION=$(cat "${FILE}") AGENT_VERSION=$(cat "${AGENT}")
if ((AGENT_VERSION < 2)); then if ((AGENT_VERSION < 2)); then
echo echo