tree: rework

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-09-19 17:26:10 +02:00
parent c41978c5d0
commit 3364944d77
27 changed files with 167 additions and 167 deletions

View File

@ -36,9 +36,6 @@ if [ "${1}" = "late" ]; then
# echo "ExecStartPre=/usr/sbin/modprobe button" >>${DEST}
# echo "ExecStart=/usr/sbin/acpid" >>${DEST}
# echo "ExecStopPost=/usr/sbin/modprobe -r button" >>${DEST}
# echo >>${DEST}
# echo "[X-Synology]" >>${DEST}
# 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

View File

@ -28,9 +28,6 @@ ExecStart=/usr/bin/allowdowngrade.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants

View File

@ -14,7 +14,7 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/amepatch.service"
cat > ${DEST} <<EOF
cat <<EOF >${DEST}
[Unit]
Description=addon amepatch
DefaultDependencies=no
@ -31,9 +31,6 @@ ExecStart=/usr/bin/amepatch.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /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

View File

@ -29,9 +29,6 @@ ExecStart=/usr/bin/arcdns.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /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

View File

@ -27,9 +27,6 @@ ExecStart=/usr/bin/codecpatch.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants

View File

@ -65,17 +65,19 @@ elif [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/keymap.service"
echo "[Unit]" >${DEST}
echo "Description=Configure keymap" >>${DEST}
echo "After=getty.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/loadkeys /usr/share/keymaps/i386/${LAYOUT:-qwerty}/${KEYMAP:-us}.map.gz" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
cat <<EOF >${DEST}
[Unit]
Description=Configure keymap
After=getty.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/loadkeys /usr/share/keymaps/i386/${LAYOUT:-qwerty}/${KEYMAP:-us}.map.gz
[Install]
WantedBy=multi-user.target
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
ln -vsf /usr/lib/systemd/system/keymap.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/keymap.service

View File

@ -30,13 +30,10 @@ User=root
Type=simple
Restart=on-failure
RestartSec=10
ExecStart=/usr/sbin/scaling.sh "${2}"
ExecStart=/usr/sbin/scaling.sh ${2}
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /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

View File

@ -28,9 +28,6 @@ ExecStart=/usr/bin/cpuinfo.sh $@
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants

View File

@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/deduplication.service"
cat > ${DEST} <<EOF
cat <<EOF >${DEST}
[Unit]
Description=Enable Deduplication
After=multi-user.target

View File

@ -104,9 +104,6 @@ ExecStart=/usr/bin/udevadm control --reload-rules
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants

View File

@ -15,17 +15,19 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/expands.service"
echo "[Unit]" >${DEST}
echo "Description=Expanded miscellaneous" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/expands.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
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
mkdir -vp /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

View File

@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/hdddb.service"
cat > ${DEST} <<EOF
cat <<EOF >${DEST}
[Unit]
Description=HDDs/SSDs drives databases
After=multi-user.target

View File

@ -43,9 +43,6 @@ ExecStart=/usr/bin/ledcontrol.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /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

View File

@ -288,6 +288,6 @@ elif [ "${1}" = "late" ]; then
fi
# Copy Loader Reboot
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin
cp -vf /usr/bin/loader-reboot.sh /tmpRoot/usr/bin/loader-reboot.sh
cp -vf /usr/bin/grub-editenv /tmpRoot/usr/bin/grub-editenv
fi

View File

@ -1,20 +1,30 @@
#!/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
echo "Creating service to exec Multi-SMB3"
mkdir -p "/tmpRoot/usr/arc/addons/"
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
cp -vf /usr/bin/smb3-multi.sh /tmpRoot/usr/bin/smb3-multi.sh
DEST="/tmpRoot/usr/lib/systemd/system/smb3-multi.service"
echo "[Unit]" >${DEST}
echo "Description=Enable Multi-SMB3" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/smb3-multi.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
cat <<EOF >${DEST}
[Unit]
Description=Enable Multi-SMB3
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/smb3-multi.sh
[Install]
WantedBy=multi-user.target
EOF
mkdir -vp /tmpRoot/lib/systemd/system/multi-user.target.wants
ln -vsf /usr/lib/systemd/system/smb3-multi.service /tmpRoot/lib/systemd/system/multi-user.target.wants/smb3-multi.service

View File

@ -10,22 +10,23 @@ if [ "${1}" = "late" ]; then
echo "Installing addon notify - ${1}"
mkdir -p "/tmpRoot/usr/arc/addons/"
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
cp -vf /usr/bin/notify.sh /tmpRoot/usr/bin/notify.sh
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/notify.service"
echo "[Unit]" >${DEST}
echo "Description=arc notify" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/notify.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
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
mkdir -vp /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

View File

@ -50,24 +50,25 @@ elif [ "${1}" = "late" ]; then
# Create storage pool page without RAID type.
cp -vf /usr/bin/nvmesystem.sh /tmpRoot/usr/bin/nvmesystem.sh
[ ! -f "/tmpRoot/usr/bin/gzip" ] && cp -vf /usr/bin/gzip /tmpRoot/usr/bin/gzip
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/nvmesystem.service"
echo "[Unit]" >${DEST}
echo "Description=Modify storage panel" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo "After=synoscgi.service" >>${DEST}
echo "After=storagepanel.service" >>${DEST} # storagepanel
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/nvmesystem.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
cat <<EOF >${DEST}
[Unit]
Description=Modify storage panel
After=multi-user.target
After=synoscgi.service
After=storagepanel.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/nvmesystem.sh
[Install]
WantedBy=multi-user.target
EOF
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

View File

@ -16,17 +16,20 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/photosfacepatch.service"
echo "[Unit]" >${DEST}
echo "Description=Enable face recognition in Synology Photos" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/photosfacepatch.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
cat <<EOF >${DEST}
[Unit]
Description=Enable face recognition in Synology Photos
After=multi-user.target
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/photosfacepatch.sh
[Install]
WantedBy=multi-user.target
EOF
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

View File

@ -24,17 +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"
echo "[Unit]" >${DEST}
echo "Description=revert" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/arc/revert.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
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
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

View File

@ -23,18 +23,20 @@ elif [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/rndis.service"
echo "[Unit]" > ${DEST}
echo "Description=Android USB Network Adapter" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo "ConditionPathExists=/sys/class/net/usb0" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=simple" >>${DEST}
echo "Restart=always" >>${DEST}
echo "ExecStart=/usr/bin/rndis.sh" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
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
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

View File

@ -1,6 +1,14 @@
#!/bin/bash
#!/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

View File

@ -15,17 +15,19 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/sequentialio.service"
echo "[Unit]" >${DEST}
echo "Description=Sequential I/O SSD caches" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/sequentialio.sh $@" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
cat <<EOF >${DEST}
[Unit]
Description=Sequential I/O SSD caches
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sequentialio.sh $@
[Install]
WantedBy=multi-user.target
EOF
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

View File

@ -18,7 +18,7 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/sspatch.service"
cat > ${DEST} <<EOF
cat <<EOF >${DEST}
[Unit]
Description=addon sspatch
After=multi-user.target

View File

@ -32,9 +32,6 @@ ExecStart=/usr/bin/storagepanel.sh $@
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants

View File

@ -16,17 +16,19 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/arc-updatenotify.service"
echo "[Unit]" >${DEST}
echo "Description=addon arc-updatenotify" >>${DEST}
echo "After=multi-user.target" >>${DEST}
echo >>${DEST}
echo "[Service]" >>${DEST}
echo "Type=oneshot" >>${DEST}
echo "RemainAfterExit=yes" >>${DEST}
echo "ExecStart=/usr/bin/arc-updatenotify.sh create" >>${DEST}
echo >>${DEST}
echo "[Install]" >>${DEST}
echo "WantedBy=multi-user.target" >>${DEST}
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
mkdir -vp /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

View File

@ -15,7 +15,7 @@ if [ "${1}" = "late" ]; then
mkdir -p "/tmpRoot/usr/lib/systemd/system"
DEST="/tmpRoot/usr/lib/systemd/system/videostation.service"
cat > ${DEST} <<EOF
cat <<EOF >${DEST}
[Unit]
Description=VideoStation for DSM
After=multi-user.target

View File

@ -24,8 +24,6 @@ elif [ "${1}" = "late" ]; then
cat <<EOF >${DEST}
[Unit]
Description=Force WOL on ethN
DefaultDependencies=no
IgnoreOnIsolate=true
After=multi-user.target
[Service]
@ -36,9 +34,6 @@ ExecStart=/usr/bin/wol.sh
[Install]
WantedBy=multi-user.target
[X-Synology]
Author=Virtualization Team
EOF
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants