mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 13:40:51 +07:00
tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
1a86875059
commit
0c9b4f1d9b
@ -22,21 +22,25 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
# mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
# DEST="/tmpRoot/usr/lib/systemd/system/acpid.service"
|
||||
# echo "[Unit]" >${DEST}
|
||||
# echo "Description=ACPI Daemon" >>${DEST}
|
||||
# echo "DefaultDependencies=no" >>${DEST}
|
||||
# echo "IgnoreOnIsolate=true" >>${DEST}
|
||||
# echo "After=multi-user.target" >>${DEST}
|
||||
# echo >>${DEST}
|
||||
# echo "[Service]" >>${DEST}
|
||||
# echo "Type=forking" >>${DEST}
|
||||
# echo "Restart=always" >>${DEST}
|
||||
# echo "RestartSec=30" >>${DEST}
|
||||
# echo "PIDFile=/var/run/acpid.pid" >>${DEST}
|
||||
# echo "ExecStartPre=/usr/sbin/modprobe button" >>${DEST}
|
||||
# echo "ExecStart=/usr/sbin/acpid" >>${DEST}
|
||||
# echo "ExecStopPost=/usr/sbin/modprobe -r button" >>${DEST}
|
||||
#
|
||||
# {
|
||||
# echo "[Unit]"
|
||||
# echo "Description=ACPI Daemon"
|
||||
# echo "DefaultDependencies=no"
|
||||
# echo "IgnoreOnIsolate=true"
|
||||
# echo "After=multi-user.target"
|
||||
# echo
|
||||
# echo "[Service]"
|
||||
# echo "Type=forking"
|
||||
# echo "Restart=always"
|
||||
# echo "RestartSec=30"
|
||||
# echo "PIDFile=/var/run/acpid.pid"
|
||||
# echo "ExecStartPre=/usr/sbin/modprobe button"
|
||||
# echo "ExecStart=/usr/sbin/acpid"
|
||||
# echo "ExecStopPost=/usr/sbin/modprobe -r button"
|
||||
# echo
|
||||
# echo "[X-Synology]"
|
||||
# echo "Author=Virtualization Team"
|
||||
# } >"${DEST}"
|
||||
# mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
# ln -vsf /usr/lib/systemd/system/acpid.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/acpid.service
|
||||
|
||||
|
@ -15,21 +15,20 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/allowdowngrade.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon allowdowngrade
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/allowdowngrade.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon allowdowngrade"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "User=root"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/allowdowngrade.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/allowdowngrade.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/allowdowngrade.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -15,19 +15,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/amepatch.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon amepatch
|
||||
After=syno-volume.target syno-space.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/amepatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon amepatch"
|
||||
echo "After=syno-volume.target syno-space.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/amepatch.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/amepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/amepatch.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -16,19 +16,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/arcdns.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon arcdns
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/arcdns.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon arcdns"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/arcdns.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/arcdns.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arcdns.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
44
beep/install.sh
Executable file
44
beep/install.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# Copyright (C) 2024 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.
|
||||
#
|
||||
|
||||
if [ "${1}" = "late" ]; then
|
||||
echo "Installing addon beep - ${1}"
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||
ESYNOSCHEDULER_DB="/tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db"
|
||||
if [ ! -f "${ESYNOSCHEDULER_DB}" ] || ! /tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" ".tables" | grep -qw "task"; then
|
||||
echo "copy esynoscheduler.db"
|
||||
mkdir -p "$(dirname "${ESYNOSCHEDULER_DB}")"
|
||||
cp -vpf /addons/esynoscheduler.db "${ESYNOSCHEDULER_DB}"
|
||||
fi
|
||||
if echo "SELECT * FROM task;" | /tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" | grep -qE "BeepOnBoot|BeepAtShutdown"; then
|
||||
echo "beep task already exists"
|
||||
else
|
||||
echo "insert beep task to esynoscheduler.db"
|
||||
/tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" <<EOF
|
||||
DELETE FROM task WHERE task_name LIKE 'BeepOnBoot';
|
||||
INSERT INTO task VALUES('BeepOnBoot', '', 'bootup', '', 1, 0, 0, 0, '', 0, "beep -f 500 -l 500 -d 500 -r 1", 'script', '{}', '', '', '{}', '{}');
|
||||
DELETE FROM task WHERE task_name LIKE 'BeepOnShutdown';
|
||||
INSERT INTO task VALUES('BeepOnShutdown', '', 'shutdown', '', 1, 0, 0, 0, '', 0, "beep -f 500 -l 500 -d 500 -r 1", 'script', '{}', '', '', '{}', '{}');
|
||||
EOF
|
||||
fi
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
echo "Installing addon beep - ${1}"
|
||||
|
||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||
ESYNOSCHEDULER_DB="/tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db"
|
||||
if [ -f "${ESYNOSCHEDULER_DB}" ]; then
|
||||
echo "delete beep task from esynoscheduler.db"
|
||||
/tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" <<EOF
|
||||
DELETE FROM task WHERE task_name LIKE 'BeepOnBoot';
|
||||
DELETE FROM task WHERE task_name LIKE 'BeepOnShutdown';
|
||||
EOF
|
||||
fi
|
||||
fi
|
20
beep/manifest.yml
Normal file
20
beep/manifest.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: 1
|
||||
name: beep
|
||||
description: "Beep at startup and shutdown (requires motherboard with buzzer)"
|
||||
system: false
|
||||
beta: false
|
||||
target: system
|
||||
all:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
apollolake: true
|
||||
broadwell: true
|
||||
broadwellnk: true
|
||||
broadwellnkv2: true
|
||||
broadwellntbap: true
|
||||
denverton: true
|
||||
geminilake: true
|
||||
purley: true
|
||||
v1000: true
|
||||
r1000: true
|
||||
epyc7002: true
|
@ -15,20 +15,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/codecpatch.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon codecpatch
|
||||
After=syno-volume.target syno-space.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/codecpatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon codecpatch"
|
||||
echo "After=syno-volume.target syno-space.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/codecpatch.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/codecpatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/codecpatch.service
|
||||
fi
|
||||
|
@ -18,23 +18,23 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
After=syno-volume.target syno-space.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
ExecStart=/usr/sbin/scaling.sh ${2}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Enable CPU Freq scaling"
|
||||
echo "After=syno-volume.target syno-space.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "User=root"
|
||||
echo "Type=simple"
|
||||
echo "Restart=on-failure"
|
||||
echo "RestartSec=10"
|
||||
echo "ExecStart=/usr/sbin/scaling.sh ${2}"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/cpufreqscaling.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpufreqscaling.service
|
||||
|
||||
if [ ! -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||
echo "copy esynoscheduler.db"
|
||||
|
@ -7,20 +7,23 @@
|
||||
#
|
||||
|
||||
TEMP="on"
|
||||
VENDOR="" # str
|
||||
FAMILY="" # str
|
||||
SERIES="$(echo $(grep 'model name' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2))" # str
|
||||
CORES="$(grep 'cpu cores' /proc/cpuinfo 2>/dev/null | wc -l)" # str
|
||||
VENDOR="" # str
|
||||
FAMILY="" # str
|
||||
SERIES="$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | xargs)" # str
|
||||
CORES="$(grep -c 'cpu cores' /proc/cpuinfo 2>/dev/null)" # str
|
||||
SPEED="$(dmidecode 2>/dev/null | grep MHz | head -1 | cut -d: -f2 | cut -d ' ' -f2))" # int
|
||||
if [ -z "${SPEED}" ] || [[ ! "${SPEED}" =~ ^[0-9]+$ ]]; then
|
||||
SPEED="$(echo $(grep 'MHz' /proc/cpuinfo 2>/dev/null | head -1 | cut -d: -f2 | cut -d. -f1))" # int
|
||||
SPEED="$(grep -m1 'MHz' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | cut -d. -f1 | xargs)" # int
|
||||
fi
|
||||
|
||||
|
||||
FILE_JS="/usr/syno/synoman/webman/modules/AdminCenter/admin_center.js"
|
||||
FILE_GZ="${FILE_JS}.gz"
|
||||
|
||||
[ ! -f "${FILE_JS}" -a ! -f "${FILE_GZ}" ] && echo "File ${FILE_JS} does not exist" && exit 0
|
||||
if [ ! -f "${FILE_JS}" ] && [ ! -f "${FILE_GZ}" ]; then
|
||||
echo "File ${FILE_JS} does not exist"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
restoreCpuinfo() {
|
||||
if [ -f "${FILE_GZ}.bak" ]; then
|
||||
@ -121,7 +124,7 @@ sed -i "s/\(\(,\)\|\((\)\).\.cpu_clock_speed/\1${SPEED//\"/}/g" "${FILE_JS}"
|
||||
|
||||
CARDN=$(ls -d /sys/class/drm/card* 2>/dev/null | head -1)
|
||||
if [ -d "${CARDN}" ]; then
|
||||
PCIDN="$(cat "${CARDN}/device/uevent" 2>/dev/null | grep -oP 'DEVNAME=\K.*')"
|
||||
PCIDN="$(awk -F= '/DEVNAME/ {print $2}' "${CARDN}/device/uevent" 2>/dev/null)"
|
||||
LNAME="$(lspci -Q -s ${PCIDN:-"99:99.9"} 2>/dev/null | sed "s/.*: //")"
|
||||
# LABLE="$(cat "/sys/class/drm/card0/device/label" 2>/dev/null)"
|
||||
CLOCK="$(cat "${CARDN}/gt_max_freq_mhz" 2>/dev/null)"
|
||||
@ -139,8 +142,6 @@ if [ "${TEMP^^}" = "ON" ]; then
|
||||
sed -i 's/,C,D);/,C,D+" \| "+t.gpu.temperature_c+" °C");/g' "${FILE_JS}"
|
||||
fi
|
||||
|
||||
if [ -f "${FILE_GZ}.bak" ]; then
|
||||
gzip -c "${FILE_JS}" >"${FILE_GZ}"
|
||||
fi
|
||||
[ -f "${FILE_GZ}.bak" ] && gzip -c "${FILE_JS}" >"${FILE_GZ}"
|
||||
|
||||
exit 0
|
@ -16,20 +16,19 @@ if [ "${1}" = "late" ]; then
|
||||
shift
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpuinfo.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Adds correct CPU Info
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/cpuinfo.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Adds correct CPU Info"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/cpuinfo.sh $@"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/cpuinfo.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/cpuinfo.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -7,15 +7,23 @@
|
||||
#
|
||||
|
||||
function getlog() {
|
||||
[ -z "${1}" ] && echo "Usage: ${0} {early|jrExit|rcExit|late|dsm}" && exit 1
|
||||
if [ -z "${1}" ]; then
|
||||
echo "Usage: ${0} {early|jrExit|rcExit|late|dsm}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WORK_PATH="/mnt/p1"
|
||||
mkdir -p "${WORK_PATH}"
|
||||
|
||||
if ! mount | grep -q "${WORK_PATH}"; then
|
||||
LOADER_DISK_PART1="$(blkid -L ARC1)"
|
||||
[ -z "${LOADER_DISK_PART1}" -a -b "/dev/synoboot1" ] && LOADER_DISK_PART1="/dev/synoboot1"
|
||||
[ -z "${LOADER_DISK_PART1}" ] && echo "Boot disk not found" && exit 1
|
||||
if [ -z "${LOADER_DISK_PART1}" ] && [ -b "/dev/synoboot1" ]; then
|
||||
LOADER_DISK_PART1="/dev/synoboot1"
|
||||
fi
|
||||
if [ -z "${LOADER_DISK_PART1}" ]; then
|
||||
echo "Boot disk not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
modprobe vfat
|
||||
echo 1 >/proc/sys/kernel/syno_install_flag
|
||||
|
@ -15,20 +15,20 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/deduplication.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable Deduplication
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/deduplication.sh -s -e --hdd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Enable Deduplication"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/deduplication.sh -s -e --hdd"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/deduplication.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/deduplication.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
Binary file not shown.
@ -95,20 +95,19 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Reload udev rules
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/udevadm hwdb --update
|
||||
ExecStart=/usr/bin/udevadm control --reload-rules
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Reload udev rules"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/udevadm hwdb --update"
|
||||
echo "ExecStart=/usr/bin/udevadm control --reload-rules"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/udevrules.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/udevrules.service
|
||||
fi
|
@ -15,20 +15,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/expands.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Expanded miscellaneous
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/expands.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Expanded miscellaneous"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/expands.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/expands.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/expands.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -15,20 +15,20 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/hdddb.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=HDDs/SSDs drives databases
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/hdddb.sh -nrwpeS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=HDDs/SSDs drives databases"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/hdddb.sh -nrwpeS"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/hdddb.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/hdddb.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -31,21 +31,21 @@ if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
# All on
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Adds uGreen LED control
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/ledcontrol.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Adds uGreen LED control"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "User=root"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/ledcontrol.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/ledcontrol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
Binary file not shown.
BIN
misc/all/usr/bin/beep
Executable file
BIN
misc/all/usr/bin/beep
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
misc/all/usr/bin/grep
Executable file
BIN
misc/all/usr/bin/grep
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Sanity checks
|
||||
if [ ! ${USER} = "root" ]; then
|
||||
exec sudo $0 $@
|
||||
fi
|
||||
|
||||
MODES="config recovery junior automated update"
|
||||
|
||||
function use() {
|
||||
echo "Use: ${0} [${MODES// /|}]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z "${1}" ] || ! echo "${MODES}" | grep -qw "${1}"; then use; fi
|
||||
|
||||
echo "Rebooting to ${1} mode"
|
||||
|
||||
echo 1 >/proc/sys/kernel/syno_install_flag 2>/dev/null
|
||||
mkdir -p /mnt/p1
|
||||
mount | grep -q /dev/synoboot1 || mount /dev/synoboot1 /mnt/p1 2>/dev/null
|
||||
|
||||
GRUBPATH="$(dirname $(find /mnt/p1 -name grub.cfg | head -1))"
|
||||
if [ -z "${GRUBPATH}" ]; then
|
||||
echo "Error: GRUB path not found"
|
||||
umount /mnt/p1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ENVFILE="${GRUBPATH}/grubenv"
|
||||
|
||||
if grub-editenv --help >/dev/null 2>&1; then
|
||||
[ ! -f "${ENVFILE}" ] && grub-editenv ${ENVFILE} create
|
||||
grub-editenv ${ENVFILE} set next_entry="${1}"
|
||||
else
|
||||
echo "# GRUB Environment Block" >${ENVFILE}
|
||||
echo "# WARNING: Do not edit this file by tools other than grub-editenv!!!" >>${ENVFILE}
|
||||
echo "next_entry=${1}" >>${ENVFILE}
|
||||
printf '%*s' 930 | tr ' ' '#' >>${ENVFILE}
|
||||
fi
|
||||
sync
|
||||
umount /mnt/p1 2>/dev/null
|
||||
|
||||
[ -x /usr/syno/sbin/synopoweroff ] && /usr/syno/sbin/synopoweroff -r || reboot
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
misc/all/usr/lib/libubsan.so
Normal file
BIN
misc/all/usr/lib/libubsan.so
Normal file
Binary file not shown.
BIN
misc/all/usr/lib/libubsan.so.1
Normal file
BIN
misc/all/usr/lib/libubsan.so.1
Normal file
Binary file not shown.
BIN
misc/all/usr/lib/libubsan.so.1.0.0
Normal file
BIN
misc/all/usr/lib/libubsan.so.1.0.0
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
misc/all/usr/sbin/inb
Executable file
BIN
misc/all/usr/sbin/inb
Executable file
Binary file not shown.
BIN
misc/all/usr/sbin/ioperm
Executable file
BIN
misc/all/usr/sbin/ioperm
Executable file
Binary file not shown.
BIN
misc/all/usr/sbin/outb
Executable file
BIN
misc/all/usr/sbin/outb
Executable file
Binary file not shown.
@ -14,20 +14,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/notify.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=arc notify
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/notify.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=arc notify"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/notify.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/notify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/notify.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -35,8 +35,8 @@ if [ "${1}" = "early" ]; then
|
||||
|
||||
elif [ "${1}" = "late" ]; then
|
||||
echo "Installing addon nvmesystem - ${1}"
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
mkdir -p "/tmpRoot/usr/rr/addons/"
|
||||
cp -pf "${0}" "/tmpRoot/usr/rr/addons/"
|
||||
|
||||
# disk/shared_disk_info_enum.c::84 Failed to allocate list in SharedDiskInfoEnum, errno=0x900.
|
||||
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
||||
@ -49,26 +49,27 @@ elif [ "${1}" = "late" ]; then
|
||||
rm -f "${SO_FILE}.tmp"
|
||||
|
||||
# Create storage pool page without RAID type.
|
||||
cp -pf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
|
||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -pf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||
cp -vpf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
|
||||
|
||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vpf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/nvmesystem.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
After=storagepanel.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/nvmesystem.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Modify storage panel(nvmesystem)"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo "After=storagepanel.service" # storagepanel
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/nvmesystem.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/nvmesystem.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/nvmesystem.service
|
||||
@ -77,12 +78,19 @@ EOF
|
||||
if cat /proc/version 2>/dev/null | grep -q 'RR@RR'; then
|
||||
ONBOOTUP=""
|
||||
ONBOOTUP="${ONBOOTUP}systemctl restart systemd-udev-trigger.service\n"
|
||||
ONBOOTUP="${ONBOOTUP}echo \"DELETE FROM task WHERE task_name LIKE ''ARCONBOOTUPARC_UDEV'';\" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db\n"
|
||||
echo "insert ARCONBOOTUPARC_UDEV task to esynoscheduler.db"
|
||||
ONBOOTUP="${ONBOOTUP}echo \"DELETE FROM task WHERE task_name LIKE ''RRONBOOTUPRR_UDEV'';\" | sqlite3 /usr/syno/etc/esynoscheduler/esynoscheduler.db\n"
|
||||
|
||||
export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib
|
||||
/tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db <<EOF
|
||||
DELETE FROM task WHERE task_name LIKE 'ARCONBOOTUPARC_UDEV';
|
||||
INSERT INTO task VALUES('ARCONBOOTUPARC_UDEV', '', 'bootup', '', 1, 0, 0, 0, '', 0, '$(echo -e ${ONBOOTUP})', 'script', '{}', '', '', '{}', '{}');
|
||||
ESYNOSCHEDULER_DB="/tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db"
|
||||
if [ ! -f "${ESYNOSCHEDULER_DB}" ] || ! /tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" ".tables" | grep -qw "task"; then
|
||||
echo "copy esynoscheduler.db"
|
||||
mkdir -p "$(dirname "${ESYNOSCHEDULER_DB}")"
|
||||
cp -vpf /addons/esynoscheduler.db "${ESYNOSCHEDULER_DB}"
|
||||
fi
|
||||
echo "insert RRONBOOTUPRR_UDEV task to esynoscheduler.db"
|
||||
/tmpRoot/bin/sqlite3 "${ESYNOSCHEDULER_DB}" <<EOF
|
||||
DELETE FROM task WHERE task_name LIKE 'RRONBOOTUPRR_UDEV';
|
||||
INSERT INTO task VALUES('RRONBOOTUPRR_UDEV', '', 'bootup', '', 1, 0, 0, 0, '', 0, '$(echo -e ${ONBOOTUP})', 'script', '{}', '', '', '{}', '{}');
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@ -19,14 +19,46 @@ if [ "${1}" = "late" ]; then
|
||||
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
||||
[ ! -f "${SO_FILE}.bak" ] && cp -pf "${SO_FILE}" "${SO_FILE}.bak"
|
||||
|
||||
cp -f "${SO_FILE}" "${SO_FILE}.tmp"
|
||||
cp -pf "${SO_FILE}" "${SO_FILE}.tmp"
|
||||
xxd -c $(xxd -p "${SO_FILE}.tmp" 2>/dev/null | wc -c) -p "${SO_FILE}.tmp" 2>/dev/null |
|
||||
sed "s/803e00b801000000752.488b/803e00b8010000009090488b/"
|
||||
| xxd -r -p > "${SO_FILE}" 2>/dev/null
|
||||
sed "s/803e00b801000000752.488b/803e00b8010000009090488b/" |
|
||||
xxd -r -p >"${SO_FILE}" 2>/dev/null
|
||||
rm -f "${SO_FILE}.tmp"
|
||||
|
||||
# Create storage pool page without RAID type.
|
||||
cp -vpf /usr/bin/nvmevolume.sh /tmpRoot/usr/bin/nvmevolume.sh
|
||||
|
||||
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vpf /usr/bin/gzip /tmpRoot/usr/bin/gzip
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/nvmevolume.service"
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Modify storage panel(nvmevolume)"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo "After=storagepanel.service" # storagepanel
|
||||
echo "After=nvmesystem.service" # nvmesystem
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/nvmevolume.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
echo "Installing addon nvmevolume - ${1}"
|
||||
|
||||
SO_FILE="/tmpRoot/usr/lib/libhwcontrol.so.1"
|
||||
[ -f "${SO_FILE}.bak" ] && mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/nvmevolume.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/nvmevolume.service"
|
||||
|
||||
# rm -f /tmpRoot/usr/bin/gzip
|
||||
[ ! -f "/tmpRoot/usr/arc/revert.sh" ] && echo '#!/usr/bin/env bash' >/tmpRoot/usr/arc/revert.sh && chmod +x /tmpRoot/usr/arc/revert.sh
|
||||
echo "/usr/bin/nvmevolume.sh -r" >>/tmpRoot/usr/arc/revert.sh
|
||||
echo "rm -f /usr/bin/nvmevolume.sh" >>/tmpRoot/usr/arc/revert.sh
|
||||
fi
|
@ -16,20 +16,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/photosfacepatch.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable face recognition in Synology Photos
|
||||
After=syno-volume.target syno-space.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/photosfacepatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Enable face recognition in Synology Photos"
|
||||
echo "After=syno-volume.target syno-space.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/photosfacepatch.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/photosfacepatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/photosfacepatch.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -24,20 +24,19 @@ if [ "${1}" = "late" ]; then
|
||||
if [ ! "$(cat "/tmpRoot/usr/arc/revert.sh")" = '#!/usr/bin/env bash' ]; then
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/revert.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=revert
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/arc/revert.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=revert"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/arc/revert.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/revert.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/revert.service
|
||||
else
|
||||
|
@ -23,21 +23,20 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/rndis.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Android USB Network Adapter
|
||||
After=multi-user.target
|
||||
ConditionPathExists=/sys/class/net/usb0
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/rndis.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Android USB Network Adapter"
|
||||
echo "After=multi-user.target"
|
||||
echo "ConditionPathExists=/sys/class/net/usb0"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=simple"
|
||||
echo "Restart=always"
|
||||
echo "ExecStart=/usr/bin/rndis.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/rndis.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/rndis.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
Binary file not shown.
@ -6,12 +6,12 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
if [[ ! -x $(which perl) ]]; then
|
||||
if ! command -v perl &>/dev/null; then
|
||||
echo "install Perl ..."
|
||||
synopkg install_from_server Perl
|
||||
fi
|
||||
|
||||
if [[ ! -x $(which perl) ]]; then
|
||||
if ! command -v perl &>/dev/null; then
|
||||
echo "Perl not found"
|
||||
exit 1
|
||||
fi
|
||||
@ -25,30 +25,23 @@ modprobe -q nct6775
|
||||
modprobe -q coretemp
|
||||
modprobe -q k10temp
|
||||
|
||||
echo 'Y' | sensors-detect --auto >/tmp/sensors.log
|
||||
cat /tmp/sensors.log | grep Driver | awk '{print $2}'
|
||||
echo 'Y' | sensors-detect --auto >"/tmp/sensors.log"
|
||||
grep -oE 'Driver\s*:\s*\w+' "/tmp/sensors.log" | awk -F': ' '{print $2}'
|
||||
|
||||
sensors
|
||||
|
||||
echo "$@" | grep -qw "\-f" && rm -f /etc/fancontrol
|
||||
if [ ! -f /etc/fancontrol ]; then
|
||||
# Or use pwmconfig to generate /etc/fancontrol interactively.
|
||||
DEVPATH=""
|
||||
DEVNAME=""
|
||||
FCTEMPS=""
|
||||
FCFANS=""
|
||||
MINTEMP=""
|
||||
MAXTEMP=""
|
||||
MINSTART=""
|
||||
MINSTOP=""
|
||||
CORETEMP="$(find /sys/devices/platform/ -name temp1_input | grep -E 'coretemp|k10temp' | sed -n -e 's|.*/\(hwmon.*\/temp1_input\).*|\1|p')"
|
||||
for P in $(find /sys/devices/platform/ -name temp1_input); do
|
||||
D="$(echo ${P} | sed -n -e 's|.*/\(devices/platform/[^/]*\)/.*|\1|p')"
|
||||
I="$(echo ${P} | sed -n -e 's|.*hwmon\([0-9]\).*|\1|p')"
|
||||
local DEVPATH DEVNAME FCTEMPS FCFANS MINTEMP MAXTEMP MINSTART MINSTOP
|
||||
local CORETEMP="$(find "/sys/devices/platform/" -name "temp1_input" | grep -E 'coretemp|k10temp' | sed -n -e 's|.*/\(hwmon.*\/temp1_input\).*|\1|p')"
|
||||
for P in $(find "/sys/devices/platform/" -name "temp1_input"); do
|
||||
D="$(echo "${P}" | sed -n -e 's|.*/\(devices/platform/[^/]*\)/.*|\1|p')"
|
||||
I="$(echo "${P}" | sed -n -e 's|.*hwmon\([0-9]\).*|\1|p')"
|
||||
DEVPATH="${DEVPATH} hwmon${I}=${D}"
|
||||
DEVNAME="${DEVNAME} hwmon${I}=$(cat /sys/${D}/*/*/name)"
|
||||
for F in $(find "/sys/${D}" -name "fan[0-9]_input"); do
|
||||
IDX="$(echo ${F} | sed -n -e 's|.*fan\([0-9]\)_input|\1|p')"
|
||||
local IDX="$(echo "${F}" | sed -n -e 's|.*fan\([0-9]\)_input|\1|p')"
|
||||
FCTEMPS="${FCTEMPS} hwmon${I}/pwm${IDX}=${CORETEMP}"
|
||||
FCFANS="${FCFANS} hwmon${I}/pwm${IDX}=hwmon${I}/fan${IDX}_input"
|
||||
MINTEMP="${MINTEMP} hwmon${I}/pwm${IDX}=30"
|
||||
@ -59,17 +52,19 @@ if [ ! -f /etc/fancontrol ]; then
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
DEST=/etc/fancontrol
|
||||
echo "# Configuration file generated by pwmconfig, changes will be lost" >${DEST}
|
||||
echo "INTERVAL=10" >>${DEST}
|
||||
echo "DEVPATH=$(echo ${DEVPATH})" >>${DEST}
|
||||
echo "DEVNAME=$(echo ${DEVNAME})" >>${DEST}
|
||||
echo "FCTEMPS=$(echo ${FCTEMPS})" >>${DEST}
|
||||
echo "FCFANS=$(echo ${FCFANS})" >>${DEST}
|
||||
echo "MINTEMP=$(echo ${MINTEMP})" >>${DEST}
|
||||
echo "MAXTEMP=$(echo ${MAXTEMP})" >>${DEST}
|
||||
echo "MINSTART=$(echo ${MINSTART})" >>${DEST}
|
||||
echo "MINSTOP=$(echo ${MINSTOP})" >>${DEST}
|
||||
DEST="/etc/fancontrol"
|
||||
{
|
||||
echo "# Configuration file generated by pwmconfig, changes will be lost"
|
||||
echo "INTERVAL=10"
|
||||
echo "DEVPATH=$(echo ${DEVPATH})"
|
||||
echo "DEVNAME=$(echo ${DEVNAME})"
|
||||
echo "FCTEMPS=$(echo ${FCTEMPS})"
|
||||
echo "FCFANS=$(echo ${FCFANS})"
|
||||
echo "MINTEMP=$(echo ${MINTEMP})"
|
||||
echo "MAXTEMP=$(echo ${MAXTEMP})"
|
||||
echo "MINSTART=$(echo ${MINSTART})"
|
||||
echo "MINSTOP=$(echo ${MINSTOP})"
|
||||
} >"${DEST}"
|
||||
fi
|
||||
|
||||
killall fancontrol
|
||||
|
@ -15,21 +15,20 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/sequentialio.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Sequential I/O SSD caches
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/sequentialio.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Sequential I/O SSD caches"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/sequentialio.sh \$@"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/sequentialio.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sequentialio.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
28
smartctl/all/usr/bin/smartctl.sh
Executable file
28
smartctl/all/usr/bin/smartctl.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2024 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.
|
||||
#
|
||||
|
||||
args=()
|
||||
|
||||
HBA=false
|
||||
for argv in "$@"; do
|
||||
if [ -e "${argv}" ] && readlink -f "/sys/block/$(basename "${argv}")/device" 2>/dev/null | grep -q "expander"; then
|
||||
HBA=true
|
||||
fi
|
||||
done
|
||||
|
||||
argp=""
|
||||
for argv in "$@"; do
|
||||
if [ "${argp}" = "-d" ] && [ "${argv}" = "ata" ] && [ "${HBA}" = "true" ]; then
|
||||
args+=("sat")
|
||||
else
|
||||
args+=("${argv}")
|
||||
fi
|
||||
argp="${argv}"
|
||||
done
|
||||
|
||||
/usr/bin/smartctl.bak "${args[@]}"
|
24
smartctl/install.sh
Executable file
24
smartctl/install.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# Copyright (C) 2024 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.
|
||||
#
|
||||
|
||||
if [ "${1}" = "late" ]; then
|
||||
echo "Installing addon smartctl - ${1}"
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -pf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
FILE="/tmpRoot/usr/bin/smartctl"
|
||||
[ ! -f "${FILE}.bak" ] && cp -pf "${FILE}" "${FILE}.bak"
|
||||
|
||||
cp -vpf /usr/bin/smartctl.sh "${FILE}"
|
||||
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
echo "Installing addon smartctl - ${1}"
|
||||
|
||||
FILE="/tmpRoot/usr/bin/smartctl"
|
||||
[ -f "${FILE}.bak" ] && mv -f "${FILE}.bak" "${FILE}"
|
||||
fi
|
20
smartctl/manifest.yml
Normal file
20
smartctl/manifest.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: 1
|
||||
name: smartctl
|
||||
description: "Fix SMART information for HBA devices. @Phachd"
|
||||
system: false
|
||||
beta: true
|
||||
target: system
|
||||
all:
|
||||
install-script: "install.sh"
|
||||
copy: "all"
|
||||
apollolake: true
|
||||
broadwell: true
|
||||
broadwellnk: true
|
||||
broadwellnkv2: true
|
||||
broadwellntbap: true
|
||||
denverton: true
|
||||
geminilake: true
|
||||
purley: true
|
||||
v1000: true
|
||||
r1000: true
|
||||
epyc7002: true
|
@ -19,19 +19,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon sspatch
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/sspatch.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon sspatch"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/sspatch.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/sspatch.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/sspatch.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -17,21 +17,20 @@ if [ "${1}" = "late" ]; then
|
||||
shift
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/storagepanel.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/storagepanel.sh $@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Modify storage panel"
|
||||
echo "Wants=smpkg-custom-install.service pkgctl-StorageManager.service"
|
||||
echo "After=smpkg-custom-install.service"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/storagepanel.sh $@"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/storagepanel.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/storagepanel.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -16,20 +16,19 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/arc-updatenotify.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon arc-updatenotify
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/arc-updatenotify.sh create
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=addon arc-updatenotify"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/arc-updatenotify.sh create"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/arc-updatenotify.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/arc-updatenotify.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
@ -21,20 +21,19 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/wol.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Force WOL on ethN
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/wol.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "Description=Force WOL on ethN"
|
||||
echo "After=multi-user.target"
|
||||
echo
|
||||
echo "[Service]"
|
||||
echo "Type=oneshot"
|
||||
echo "RemainAfterExit=yes"
|
||||
echo "ExecStart=/usr/bin/wol.sh"
|
||||
echo
|
||||
echo "[Install]"
|
||||
echo "WantedBy=multi-user.target"
|
||||
} >"${DEST}"
|
||||
mkdir -p /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/wol.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/wol.service
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user