mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: update and fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
c695e37cbc
commit
76fd673f49
Binary file not shown.
@ -17,13 +17,12 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon amepatch
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/amepatch.sh
|
||||
|
||||
[Install]
|
||||
|
Binary file not shown.
@ -58,7 +58,7 @@ elif [ "${1}" = "late" ]; then
|
||||
# run when boot installed DSM
|
||||
echo -e "DSM mode\n" >/tmpRoot/etc/issue
|
||||
|
||||
cp -fv /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@tty1.service
|
||||
cp -vf /tmpRoot/usr/lib/systemd/system/serial-getty\@.service /tmpRoot/usr/lib/systemd/system/getty\@tty1.service
|
||||
sed -i 's|^ExecStart=.*|ExecStart=/sbin/agetty %I 115200 linux|' /tmpRoot/usr/lib/systemd/system/getty\@tty1.service
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/getty.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/getty\@tty1.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@tty1.service
|
||||
|
@ -20,16 +20,12 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
After=udevrules.service
|
||||
Wants=smpkg-custom-install.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/sbin/scaling.sh ${2}
|
||||
|
||||
[Install]
|
||||
|
@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable Deduplication
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
Binary file not shown.
@ -88,7 +88,7 @@ elif [ "${1}" = "late" ]; then
|
||||
/usr/sbin/modprobe kvm_amd || true # kvm-amd.ko
|
||||
|
||||
echo "Copy rules"
|
||||
cp -vf /usr/lib/udev/rules.d/* /tmpRoot/usr/lib/udev/rules.d/
|
||||
/tmpRoot/bin/cp -vrf /usr/lib/udev/* /tmpRoot/usr/lib/udev/
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service"
|
||||
|
@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=HDDs/SSDs drives databases
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
@ -23,18 +23,15 @@ if [ "${1}" = "late" ]; then
|
||||
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol_disk.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol_disk.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol_cpu.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol_cpu.service"
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
# All on
|
||||
# All on
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Adds uGreen LED control
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@ -51,10 +48,6 @@ elif [ "${1}" = "uninstall" ]; then
|
||||
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol_disk.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol_disk.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/ledcontrol_cpu.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/ledcontrol_cpu.service"
|
||||
|
||||
[ ! -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/ledcontrol.sh" >>/tmpRoot/usr/arc/revert.sh
|
||||
|
@ -244,7 +244,7 @@ elif [ "${1}" = "late" ]; then
|
||||
fi
|
||||
|
||||
# SD Card
|
||||
cp -f /tmpRoot/usr/lib/udev/script/sdcard.sh /tmpRoot/usr/lib/udev/script/sdcard.sh.bak
|
||||
[ ! -f /tmpRoot/usr/lib/udev/script/sdcard.sh.bak ] && cp -f /tmpRoot/usr/lib/udev/script/sdcard.sh /tmpRoot/usr/lib/udev/script/sdcard.sh.bak
|
||||
echo -en '#!/bin/sh\nexit 0\n' >/tmpRoot/usr/lib/udev/script/sdcard.sh
|
||||
|
||||
# Network Init
|
||||
|
@ -57,8 +57,8 @@ elif [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
After=multi-user.target
|
||||
After=synoscgi.service
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
After=storagepanel.service
|
||||
|
||||
[Service]
|
||||
|
@ -19,7 +19,8 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable face recognition in Synology Photos
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Make things safer
|
||||
set -euo pipefail
|
||||
|
||||
if [ $(synopkg status ScsiTarget | grep error | wc -l) -gt 0 ]; then
|
||||
|
||||
modprobe target_core_mod
|
||||
modprobe target_core_iblock
|
||||
modprobe target_core_file
|
||||
modprobe target_core_multi_file
|
||||
modprobe target_core_user
|
||||
modprobe iscsi_target_mod
|
||||
modprobe tcm_loop
|
||||
modprobe vhost
|
||||
modprobe vhost_scsi
|
||||
|
||||
synopkg start ScsiTarget
|
||||
|
||||
fi
|
||||
|
||||
if [ -d /config/target ]; then
|
||||
mkdir /config/target/iscsi
|
||||
mkdir /config/target/loopback
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env ash
|
||||
#
|
||||
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium>
|
||||
#
|
||||
# This is free software, licensed under the MIT License.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
echo "sanmanager-repair late"
|
||||
cp -vf sanrepair.sh /tmpRoot/usr/sbin/sanrepair.sh
|
||||
chmod 755 /tmpRoot/usr/sbin/sanrepair.sh
|
||||
|
||||
if [ -f /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db ]; then
|
||||
if [ $(/tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db "select count(*) as cnt from task a where task_name = 'sanmanager-repair';") -gt "0" ]; then
|
||||
echo "A sanmanager-repair task already exists at task_name. skipped!!!"
|
||||
else
|
||||
echo "insert sanmanager-repair task"
|
||||
/tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db "INSERT INTO task VALUES('sanmanager-repair', '', 'bootup', '', 1, 0, 0, 0, '', 0, 'while true; do sleep 10; /usr/sbin/sanrepair.sh; [ -d /config/target/loopback ] && break; done', 'script', '{"running":[17917]}', 1706787067, 0, '{}', '{}');"
|
||||
fi
|
||||
else
|
||||
echo "copy sanmanager-repair task db"
|
||||
mkdir -p /tmpRoot/usr/syno/etc/esynoscheduler
|
||||
cp -f esynoscheduler.db /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db
|
||||
fi
|
||||
|
||||
fi
|
@ -1,20 +0,0 @@
|
||||
version: 1
|
||||
name: sanmanager-repair
|
||||
description: "Repair SAN Manager in DSM (Only use if you have a broken SAN Manager)"
|
||||
system: false
|
||||
beta: true
|
||||
target: app
|
||||
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
|
Binary file not shown.
@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Sequential I/O SSD caches
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
@ -21,11 +21,10 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=addon sspatch
|
||||
After=multi-user.target
|
||||
After=allowdowngrade.service
|
||||
Wants=smpkg-custom-install.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/sspatch.sh
|
||||
|
@ -20,12 +20,10 @@ if [ "${1}" = "late" ]; then
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Modify storage panel
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
Wants=smpkg-custom-install.service pkgctl-StorageManager.service
|
||||
After=smpkg-custom-install.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/storagepanel.sh $@
|
||||
|
Loading…
Reference in New Issue
Block a user