tree: update and fix

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-10-02 19:51:19 +02:00
parent c695e37cbc
commit 76fd673f49
20 changed files with 28 additions and 115 deletions

Binary file not shown.

View File

@ -17,13 +17,12 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=addon amepatch Description=addon amepatch
After=multi-user.target Wants=smpkg-custom-install.service
After=smpkg-custom-install.service
[Service] [Service]
User=root Type=oneshot
Type=simple RemainAfterExit=yes
Restart=on-failure
RestartSec=5
ExecStart=/usr/bin/amepatch.sh ExecStart=/usr/bin/amepatch.sh
[Install] [Install]

Binary file not shown.

View File

@ -58,7 +58,7 @@ elif [ "${1}" = "late" ]; then
# run when boot installed DSM # run when boot installed DSM
echo -e "DSM mode\n" >/tmpRoot/etc/issue 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 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 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 ln -vsf /usr/lib/systemd/system/getty\@tty1.service /tmpRoot/usr/lib/systemd/system/getty.target.wants/getty\@tty1.service

View File

@ -20,16 +20,12 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Enable CPU Freq scaling Description=Enable CPU Freq scaling
DefaultDependencies=no Wants=smpkg-custom-install.service
IgnoreOnIsolate=true After=smpkg-custom-install.service
After=multi-user.target
After=udevrules.service
[Service] [Service]
User=root Type=oneshot
Type=simple RemainAfterExit=yes
Restart=on-failure
RestartSec=10
ExecStart=/usr/sbin/scaling.sh ${2} ExecStart=/usr/sbin/scaling.sh ${2}
[Install] [Install]

View File

@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Enable Deduplication Description=Enable Deduplication
After=multi-user.target Wants=smpkg-custom-install.service pkgctl-StorageManager.service
After=smpkg-custom-install.service
[Service] [Service]
Type=oneshot Type=oneshot

Binary file not shown.

View File

@ -88,7 +88,7 @@ elif [ "${1}" = "late" ]; then
/usr/sbin/modprobe kvm_amd || true # kvm-amd.ko /usr/sbin/modprobe kvm_amd || true # kvm-amd.ko
echo "Copy rules" 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" mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service" DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service"

View File

@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=HDDs/SSDs drives databases Description=HDDs/SSDs drives databases
After=multi-user.target Wants=smpkg-custom-install.service pkgctl-StorageManager.service
After=smpkg-custom-install.service
[Service] [Service]
Type=oneshot Type=oneshot

View File

@ -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/multi-user.target.wants/ledcontrol.service"
rm -f "/tmpRoot/usr/lib/systemd/system/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" mkdir -p "/tmpRoot/usr/lib/systemd/system"
# All on # All on
DEST="/tmpRoot/usr/lib/systemd/system/ledcontrol.service" DEST="/tmpRoot/usr/lib/systemd/system/ledcontrol.service"
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Adds uGreen LED control Description=Adds uGreen LED control
After=multi-user.target Wants=smpkg-custom-install.service pkgctl-StorageManager.service
After=smpkg-custom-install.service
[Service] [Service]
Type=oneshot 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/multi-user.target.wants/ledcontrol.service"
rm -f "/tmpRoot/usr/lib/systemd/system/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 [ ! -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 echo "/usr/bin/ledcontrol.sh" >>/tmpRoot/usr/arc/revert.sh

View File

@ -244,7 +244,7 @@ elif [ "${1}" = "late" ]; then
fi fi
# SD Card # 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 echo -en '#!/bin/sh\nexit 0\n' >/tmpRoot/usr/lib/udev/script/sdcard.sh
# Network Init # Network Init

View File

@ -57,8 +57,8 @@ elif [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Modify storage panel Description=Modify storage panel
After=multi-user.target Wants=smpkg-custom-install.service pkgctl-StorageManager.service
After=synoscgi.service After=smpkg-custom-install.service
After=storagepanel.service After=storagepanel.service
[Service] [Service]

View File

@ -19,7 +19,8 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Enable face recognition in Synology Photos 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] [Service]
User=root User=root

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Sequential I/O SSD caches Description=Sequential I/O SSD caches
After=multi-user.target Wants=smpkg-custom-install.service pkgctl-StorageManager.service
After=smpkg-custom-install.service
[Service] [Service]
Type=oneshot Type=oneshot

View File

@ -21,11 +21,10 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=addon sspatch Description=addon sspatch
After=multi-user.target Wants=smpkg-custom-install.service
After=allowdowngrade.service After=smpkg-custom-install.service
[Service] [Service]
User=root
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=/usr/bin/sspatch.sh ExecStart=/usr/bin/sspatch.sh

View File

@ -20,12 +20,10 @@ if [ "${1}" = "late" ]; then
cat <<EOF >${DEST} cat <<EOF >${DEST}
[Unit] [Unit]
Description=Modify storage panel Description=Modify storage panel
DefaultDependencies=no Wants=smpkg-custom-install.service pkgctl-StorageManager.service
IgnoreOnIsolate=true After=smpkg-custom-install.service
After=multi-user.target
[Service] [Service]
User=root
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=/usr/bin/storagepanel.sh $@ ExecStart=/usr/bin/storagepanel.sh $@