tree: bugfix

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-24 18:23:26 +02:00
parent 347e4c4231
commit 5cd825ad13
9 changed files with 38956 additions and 22 deletions

View File

@ -12,7 +12,7 @@ if [ "${1}" = "late" ]; then
cp -vf "${0}" "/tmpRoot/usr/arc/addons/" cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
MODEL="$(cat /proc/sys/kernel/syno_hw_version)" MODEL="$(cat /proc/sys/kernel/syno_hw_version)"
FILE="/tmpRoot/usr/syno/etc.defaults/adapter_cards.conf" FILE="/tmpRoot/usr/syno/etc/adapter_cards.conf"
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak" [ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
@ -26,6 +26,6 @@ if [ "${1}" = "late" ]; then
elif [ "${1}" = "uninstall" ]; then elif [ "${1}" = "uninstall" ]; then
echo "Installing addon addincards - ${1}" echo "Installing addon addincards - ${1}"
FILE="/tmpRoot/usr/syno/etc.defaults/adapter_cards.conf" FILE="/tmpRoot/usr/syno/etc/adapter_cards.conf"
[ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}" [ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}"
fi fi

View File

@ -7,7 +7,7 @@
# #
# usb.map # usb.map
FILE="/usr/syno/etc.defaults/usb.map" FILE="/usr/syno/etc/usb.map"
if [ -f "${FILE}" ]; then if [ -f "${FILE}" ]; then
STATUS=$(curl -kL -w "%{http_code}" "http://www.linux-usb.org/usb.ids" -o "/tmp/usb.map") STATUS=$(curl -kL -w "%{http_code}" "http://www.linux-usb.org/usb.ids" -o "/tmp/usb.map")
if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then if [ $? -ne 0 -o ${STATUS} -ne 200 ]; then
@ -15,10 +15,6 @@ if [ -f "${FILE}" ]; then
else else
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak" [ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
cp -f "/tmp/usb.map" "${FILE}" cp -f "/tmp/usb.map" "${FILE}"
if [ -f "${FILE/\.defaults/}" ]; then
[ ! -f "${FILE/\.defaults/}.bak" ] && cp -f "${FILE/\.defaults/}" "${FILE/\.defaults/}.bak"
cp -f "/tmp/usb.map" "${FILE/\.defaults/}"
fi
fi fi
fi fi

View File

@ -37,7 +37,7 @@ elif [ "${1}" = "uninstall" ]; then
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service" rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service"
rm -f "/tmpRoot/usr/lib/systemd/system/expands.service" rm -f "/tmpRoot/usr/lib/systemd/system/expands.service"
FILE="/tmpRoot/usr/syno/etc.defaults/usb.map" FILE="/tmpRoot/usr/syno/etc/usb.map"
[ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}" [ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}"
FILE="/tmpRoot/etc/ssl/certs/ca-certificates.crt" FILE="/tmpRoot/etc/ssl/certs/ca-certificates.crt"
[ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}" [ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}"

View File

@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js # /var/packages/StorageManager/target/ui/storage_panel.js
scriptver="v3.5.101" scriptver="v3.5.103"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db scriptname=syno_hdd_db
@ -896,11 +896,9 @@ fixdrivemodel(){
get_size_gb(){ get_size_gb(){
# $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc # $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc
local float local disk_size_gb
local int disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
float=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print $4 * 1.0737}') echo "$disk_size_gb"
int="${float%.*}"
echo "$int"
} }
getdriveinfo(){ getdriveinfo(){
@ -1150,15 +1148,23 @@ fi
# Expansion units # Expansion units
# Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log # eSATA and InfiniBand ports both appear in syno_slot_mapping as:
# Otherwise the new /var/log/diskprediction log is only created a midnight. # Esata port count: 1
/usr/syno/bin/syno_disk_data_collector record # Eunit port 1 - RX1214
# Only device tree models have syno_slot_mapping
if which syno_slot_mapping >/dev/null; then
eunitlist=($(syno_slot_mapping | grep 'Eunit port' | awk '{print $5}'))
else
# Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log
# Otherwise the new /var/log/diskprediction log is only created a midnight.
/usr/syno/bin/syno_disk_data_collector record
# Get list of connected expansion units (aka eunit/ebox) # Get list of connected expansion units (aka eunit/ebox)
path="/var/log/diskprediction" path="/var/log/diskprediction"
# shellcheck disable=SC2012 # shellcheck disable=SC2012
file=$(ls $path | tail -n1) file=$(ls $path | tail -n1)
eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq)) eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq))
fi
# Sort eunitlist array into new eunits array to remove duplicates # Sort eunitlist array into new eunits array to remove duplicates
if [[ ${#eunitlist[@]} -gt "0" ]]; then if [[ ${#eunitlist[@]} -gt "0" ]]; then
@ -2095,10 +2101,12 @@ if [[ $nodbupdate == "yes" ]]; then
# Add drive_db_test_url="127.0.0.1" # Add drive_db_test_url="127.0.0.1"
#echo 'drive_db_test_url="127.0.0.1"' >> "$synoinfo" #echo 'drive_db_test_url="127.0.0.1"' >> "$synoinfo"
/usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1" /usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1"
[ -d /tmpRoot ] && /tmpRoot/usr/syno/bin/synosetkeyvalue /tmpRoot/etc.defaults/synoinfo.conf "$dtu" "127.0.0.1"
disabled="yes" disabled="yes"
elif [[ $url != "127.0.0.1" ]]; then elif [[ $url != "127.0.0.1" ]]; then
# Edit drive_db_test_url= # Edit drive_db_test_url=
/usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1" /usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1"
[ -d /tmpRoot ] && /tmpRoot/usr/syno/bin/synosetkeyvalue /tmpRoot/etc.defaults/synoinfo.conf "$dtu" "127.0.0.1"
disabled="yes" disabled="yes"
fi fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

38930
misc/all/usr/sbin/inxi Executable file

File diff suppressed because it is too large Load Diff