mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: bugfix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
347e4c4231
commit
5cd825ad13
@ -12,7 +12,7 @@ if [ "${1}" = "late" ]; then
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
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"
|
||||
|
||||
@ -26,6 +26,6 @@ if [ "${1}" = "late" ]; then
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
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}"
|
||||
fi
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
# usb.map
|
||||
FILE="/usr/syno/etc.defaults/usb.map"
|
||||
FILE="/usr/syno/etc/usb.map"
|
||||
if [ -f "${FILE}" ]; then
|
||||
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
|
||||
@ -15,10 +15,6 @@ if [ -f "${FILE}" ]; then
|
||||
else
|
||||
[ ! -f "${FILE}.bak" ] && cp -f "${FILE}" "${FILE}.bak"
|
||||
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
|
||||
|
||||
|
@ -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/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}"
|
||||
FILE="/tmpRoot/etc/ssl/certs/ca-certificates.crt"
|
||||
[ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}"
|
||||
|
@ -29,7 +29,7 @@
|
||||
# /var/packages/StorageManager/target/ui/storage_panel.js
|
||||
|
||||
|
||||
scriptver="v3.5.101"
|
||||
scriptver="v3.5.103"
|
||||
script=Synology_HDD_db
|
||||
repo="007revad/Synology_HDD_db"
|
||||
scriptname=syno_hdd_db
|
||||
@ -896,11 +896,9 @@ fixdrivemodel(){
|
||||
|
||||
get_size_gb(){
|
||||
# $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc
|
||||
local float
|
||||
local int
|
||||
float=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print $4 * 1.0737}')
|
||||
int="${float%.*}"
|
||||
echo "$int"
|
||||
local disk_size_gb
|
||||
disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}')
|
||||
echo "$disk_size_gb"
|
||||
}
|
||||
|
||||
getdriveinfo(){
|
||||
@ -1150,15 +1148,23 @@ fi
|
||||
|
||||
|
||||
# Expansion units
|
||||
# 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
|
||||
# eSATA and InfiniBand ports both appear in syno_slot_mapping as:
|
||||
# Esata port count: 1
|
||||
# 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)
|
||||
path="/var/log/diskprediction"
|
||||
# shellcheck disable=SC2012
|
||||
file=$(ls $path | tail -n1)
|
||||
eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq))
|
||||
# Get list of connected expansion units (aka eunit/ebox)
|
||||
path="/var/log/diskprediction"
|
||||
# shellcheck disable=SC2012
|
||||
file=$(ls $path | tail -n1)
|
||||
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
|
||||
if [[ ${#eunitlist[@]} -gt "0" ]]; then
|
||||
@ -2095,10 +2101,12 @@ if [[ $nodbupdate == "yes" ]]; then
|
||||
# Add drive_db_test_url="127.0.0.1"
|
||||
#echo 'drive_db_test_url="127.0.0.1"' >> "$synoinfo"
|
||||
/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"
|
||||
elif [[ $url != "127.0.0.1" ]]; then
|
||||
# Edit drive_db_test_url=
|
||||
/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"
|
||||
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
38930
misc/all/usr/sbin/inxi
Executable file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user