diff --git a/acpid/all/addons/acpid-7.1.tgz b/acpid/all/addons/acpid-7.1.tgz index bc5f4ed..2712b0a 100644 Binary files a/acpid/all/addons/acpid-7.1.tgz and b/acpid/all/addons/acpid-7.1.tgz differ diff --git a/amepatch/install.sh b/amepatch/install.sh index d6896de..2cf10a5 100755 --- a/amepatch/install.sh +++ b/amepatch/install.sh @@ -17,13 +17,12 @@ if [ "${1}" = "late" ]; then cat <${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] diff --git a/console/all/addons/console-7.1.tgz b/console/all/addons/console-7.1.tgz index e598160..91a39ed 100755 Binary files a/console/all/addons/console-7.1.tgz and b/console/all/addons/console-7.1.tgz differ diff --git a/console/install.sh b/console/install.sh index 2be29cb..41e764c 100755 --- a/console/install.sh +++ b/console/install.sh @@ -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 diff --git a/cpufreqscaling/install.sh b/cpufreqscaling/install.sh index 81da22b..bf94c55 100755 --- a/cpufreqscaling/install.sh +++ b/cpufreqscaling/install.sh @@ -20,16 +20,12 @@ if [ "${1}" = "late" ]; then cat <${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] diff --git a/deduplication/install.sh b/deduplication/install.sh index d21be1b..88c69cb 100755 --- a/deduplication/install.sh +++ b/deduplication/install.sh @@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then cat <${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 diff --git a/eudev/all/addons/eudev-7.1.tgz b/eudev/all/addons/eudev-7.1.tgz index 66bc3f5..30e7da8 100644 Binary files a/eudev/all/addons/eudev-7.1.tgz and b/eudev/all/addons/eudev-7.1.tgz differ diff --git a/eudev/install.sh b/eudev/install.sh index 8e6c9c8..b296e6f 100755 --- a/eudev/install.sh +++ b/eudev/install.sh @@ -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" diff --git a/hdddb/install.sh b/hdddb/install.sh index 8a4e3f5..107f7c9 100755 --- a/hdddb/install.sh +++ b/hdddb/install.sh @@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then cat <${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 diff --git a/ledcontrol/install.sh b/ledcontrol/install.sh index 9c1a2d7..bd072bd 100755 --- a/ledcontrol/install.sh +++ b/ledcontrol/install.sh @@ -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 <${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 diff --git a/misc/install.sh b/misc/install.sh index 4074905..f1d92fe 100755 --- a/misc/install.sh +++ b/misc/install.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 diff --git a/nvmesystem/install.sh b/nvmesystem/install.sh index da88067..3587864 100755 --- a/nvmesystem/install.sh +++ b/nvmesystem/install.sh @@ -57,8 +57,8 @@ elif [ "${1}" = "late" ]; then cat <${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] diff --git a/photosfacepatch/install.sh b/photosfacepatch/install.sh index 9362256..9e43619 100755 --- a/photosfacepatch/install.sh +++ b/photosfacepatch/install.sh @@ -19,7 +19,8 @@ if [ "${1}" = "late" ]; then cat <${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 diff --git a/sanmanager-repair/all/usr/sbin/sanrepair.sh b/sanmanager-repair/all/usr/sbin/sanrepair.sh deleted file mode 100755 index ec15419..0000000 --- a/sanmanager-repair/all/usr/sbin/sanrepair.sh +++ /dev/null @@ -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 \ No newline at end of file diff --git a/sanmanager-repair/install.sh b/sanmanager-repair/install.sh deleted file mode 100755 index 41de478..0000000 --- a/sanmanager-repair/install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ash -# -# Copyright (C) 2023 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 diff --git a/sanmanager-repair/manifest.yml b/sanmanager-repair/manifest.yml deleted file mode 100644 index a69b65a..0000000 --- a/sanmanager-repair/manifest.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/sensors/all/addons/sensors-7.1.tgz b/sensors/all/addons/sensors-7.1.tgz index 2432235..6afc206 100644 Binary files a/sensors/all/addons/sensors-7.1.tgz and b/sensors/all/addons/sensors-7.1.tgz differ diff --git a/sequentialio/install.sh b/sequentialio/install.sh index 4ef2f5c..98dcb20 100755 --- a/sequentialio/install.sh +++ b/sequentialio/install.sh @@ -18,7 +18,8 @@ if [ "${1}" = "late" ]; then cat <${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 diff --git a/sspatch/install.sh b/sspatch/install.sh index 1dd4555..95aec81 100755 --- a/sspatch/install.sh +++ b/sspatch/install.sh @@ -21,11 +21,10 @@ if [ "${1}" = "late" ]; then cat <${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 diff --git a/storagepanel/install.sh b/storagepanel/install.sh index 075a6e3..056378d 100755 --- a/storagepanel/install.sh +++ b/storagepanel/install.sh @@ -20,12 +20,10 @@ if [ "${1}" = "late" ]; then cat <${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 $@