From 5f7a730447aa0543ffa4841462ec41f232b9c55b Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sat, 31 Aug 2024 14:52:10 -0400 Subject: [PATCH] sspatch: rework Signed-off-by: AuxXxilium --- sspatch/install.sh | 38 +++++++++++++++++--------------------- sspatch/manifest.yml | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/sspatch/install.sh b/sspatch/install.sh index c773435..72f1bd5 100755 --- a/sspatch/install.sh +++ b/sspatch/install.sh @@ -28,27 +28,23 @@ if [ "${1}" = "late" ]; then ADDONSPATH="/tmpRoot/usr/arc/addons" if [ -d "${SSPATH}" ]; then # Define the hosts entries to be added - ENTRIES=("0.0.0.0 synosurveillance.synology.com") - for ENTRY in "${ENTRIES[@]}" - do - if [ -f "/tmpRoot/etc/hosts" ]; then - # Check if the entry is already in the file - if grep -Fxq "${ENTRY}" /tmpRoot/etc/hosts; then - echo "Entry ${ENTRY} already exists" - else - echo "Entry ${ENTRY} does not exist, adding now" - echo "${ENTRY}" >> /tmpRoot/etc/hosts - fi - fi - if [ -f "/tmpRoot/etc.defaults/hosts" ]; then - if grep -Fxq "${ENTRY}" /tmpRoot/etc.defaults/hosts; then - echo "Entry ${ENTRY} already exists" - else - echo "Entry ${ENTRY} does not exist, adding now" - echo "${ENTRY}" >> /tmpRoot/etc.defaults/hosts - fi - fi - done + if [ -f "/tmpRoot/etc/hosts" ]; then + # Check if the entry is already in the file + if grep -Fxq "0.0.0.0 synosurveillance.synology.com" /tmpRoot/etc/hosts; then + echo "Entry already exists" + else + echo "Entry does not exist, adding now" + echo "0.0.0.0 synosurveillance.synology.com" >> /tmpRoot/etc/hosts + fi + fi + if [ -f "/tmpRoot/etc.defaults/hosts" ]; then + if grep -Fxq "${ENTRY}" /tmpRoot/etc.defaults/hosts; then + echo "Entry ${ENTRY} already exists" + else + echo "Entry ${ENTRY} does not exist, adding now" + echo "${ENTRY}" >> /tmpRoot/etc.defaults/hosts + fi + fi # Check Sha256sum for Patch CHECKSUM=$(sha256sum ${SSPATH}/lib/libssutils.so | cut -d' ' -f1) diff --git a/sspatch/manifest.yml b/sspatch/manifest.yml index afadfe4..637a355 100644 --- a/sspatch/manifest.yml +++ b/sspatch/manifest.yml @@ -1,6 +1,6 @@ version: 1 name: sspatch -description: "Dynamic License Patch for SS 9.2.0-11289 (Non DVA)" +description: "Dynamic License Patch for SS 9.2.0-11289 (Not for DVA 32xx)" system: false beta: true all: