nvmevolume: add autoblocking if nvmesystem is choosen

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-05-14 17:12:48 +02:00
parent 045742c41b
commit f0887f6cbf

View File

@ -2,9 +2,15 @@
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# Fromhttps://github.com/007revad/Synology_enable_M2_volume
# From: https://github.com/PeterSuh-Q3/tcrp-addons/blob/main/nvmevolume-onthefly/src/install.sh
#
if grep -qw "/addons/nvmesystem.sh" "/addons/addons.sh"; then
echo "nvmevolume is not required if nvmesystem exists!"
exit 0
fi
if [ "${1}" = "late" ]; then
echo "Installing addon nvmevolume - ${1}"
mkdir -p "/tmpRoot/usr/arc/addons/"
@ -21,4 +27,4 @@ elif [ "${1}" = "uninstall" ]; then
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
[ -f "${SO_FILE}.bak" ] && mv -f "${SO_FILE}.bak" "${SO_FILE}"
fi
fi