arc-addons/remotefs/all/usr/bin/remotefs.sh
AuxXxilium 61428412c5 photosfacepatch/remotefs: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
2024-05-27 19:30:50 +02:00

28 lines
644 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
SO_FILE="/usr/lib/libsynosdk.so.7"
if [ "${1}" = "-r" ]; then
if [ -f "${SO_FILE}.bak" ]; then
mv -f "${SO_FILE}.bak" "${SO_FILE}"
fi
exit
fi
if [ ! -f "${SO_FILE}" ]; then
echo "${SO_FILE} not found"
exit
fi
if [ ! -f "${SO_FILE}.bak" ]; then
echo "Backup ${SO_FILE}"
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
fi
echo "Patching ${SO_FILE}"
PatchELFSharp "${SO_FILE}" "SYNOFSIsRemoteFS" "B8 00 00 00 00 C3"