mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
346779ae2a
commit
90f0659795
BIN
acpid/all/addons/acpid-7.1.tgz
Normal file
BIN
acpid/all/addons/acpid-7.1.tgz
Normal file
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
# /etc/acpi/events/powerbtn
|
||||
# This is called when the user presses the power button and calls
|
||||
# /etc/acpi/powerbtn.sh for further processing.
|
||||
|
||||
# Optionally you can specify the placeholder %e. It will pass
|
||||
# through the whole kernel event message to the program you've
|
||||
# specified.
|
||||
|
||||
# We need to react on "button power.*" and "button/power.*" because
|
||||
# of kernel changes.
|
||||
|
||||
event=button[ /]power
|
||||
action=/etc/acpi/power.sh
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
logger -p err "Shutdown from ACPI"
|
||||
[ -x /usr/syno/sbin/synopoweroff ] && \
|
||||
/usr/syno/sbin/synopoweroff ||
|
||||
/usr/sbin/poweroff
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -11,38 +11,37 @@ if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
mkdir -p /tmpRoot/etc/acpi/events/
|
||||
cp -vf /etc/acpi/events/power /tmpRoot/etc/acpi/events/power
|
||||
cp -vf /etc/acpi/power.sh /tmpRoot/etc/acpi/power.sh
|
||||
cp -vf /usr/bin/acpi_listen /tmpRoot/usr/bin/acpi_listen
|
||||
cp -vf /usr/sbin/acpid /tmpRoot/usr/sbin/acpid
|
||||
cp -vf /usr/sbin/kacpimon /tmpRoot/usr/sbin/kacpimon
|
||||
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/usr/ ./bin ./sbin
|
||||
tar -zxf /addons/acpid-7.1.tgz -C /tmpRoot/ ./etc ./usr
|
||||
sed -i 's|=/|=-/|g' /tmpRoot/usr/lib/systemd/system/acpid.service
|
||||
if [ -f /usr/lib/modules/button.ko ]; then
|
||||
cp -vf /usr/lib/modules/button.ko /tmpRoot/usr/lib/modules/button.ko
|
||||
else
|
||||
echo "No button.ko found"
|
||||
fi
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/acpid.service"
|
||||
echo "[Unit]" >${DEST}
|
||||
echo "Description=addon acpid" >>${DEST}
|
||||
echo "DefaultDependencies=no" >>${DEST}
|
||||
echo "IgnoreOnIsolate=true" >>${DEST}
|
||||
echo "After=multi-user.target" >>${DEST}
|
||||
echo >>${DEST}
|
||||
echo "[Service]" >>${DEST}
|
||||
echo "Restart=always" >>${DEST}
|
||||
echo "RestartSec=30" >>${DEST}
|
||||
echo "ExecStartPre=-/usr/sbin/modprobe button" >>${DEST}
|
||||
echo "ExecStart=/usr/sbin/acpid -f" >>${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
|
||||
# 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 >>${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
|
||||
|
||||
elif [ "${1}" = "uninstall" ]; then
|
||||
echo "Installing addon acpid - ${1}"
|
||||
@ -50,8 +49,7 @@ elif [ "${1}" = "uninstall" ]; then
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/multi-user.target.wants/acpid.service"
|
||||
rm -f "/tmpRoot/usr/lib/systemd/system/acpid.service"
|
||||
|
||||
rm -f /tmpRoot/etc/acpi/events/power
|
||||
rm -f /tmpRoot/etc/acpi/power.sh
|
||||
rm -rf /tmpRoot/etc/acpi
|
||||
rm -f /tmpRoot/usr/bin/acpi_listen
|
||||
rm -f /tmpRoot/usr/sbin/acpid
|
||||
rm -f /tmpRoot/usr/sbin/kacpimon
|
||||
|
@ -1,6 +1,6 @@
|
||||
version: 1
|
||||
name: acpid
|
||||
description: "Daemon for delivering ACPI events (Shutdown Button, CPU Frequency, etc.)"
|
||||
description: "Daemon for delivering ACPI events (Powerbutton, etc.)"
|
||||
system: false
|
||||
beta: false
|
||||
all:
|
||||
|
@ -172,9 +172,9 @@ function dtModel() {
|
||||
PCIHEAD="$(ls -l /sys/class/scsi_host 2>/dev/null | grep ${P} | head -1)"
|
||||
PCIPATH=""
|
||||
if [ "$(_kernelVersionCode "$(_kernelVersion)")" -ge "$(_kernelVersionCode "5.10")" ]; then
|
||||
PCIPATH="$(echo "${PCIHEAD}" | grep -oP 'pci\K[0-9]{4}:[0-9]{2}')" # 5.10+ kernel
|
||||
PCIPATH="$(echo "${PCIHEAD}" | grep -oE 'pci[0-9]{4}:[0-9]{2}' | sed 's/pci//')" # 5.10+ kernel
|
||||
else
|
||||
PCIPATH="$(echo "${PCIHEAD}" | grep -oP 'pci\K[0-9]{4}:[0-9]{2}' | cut -d':' -f2)" # 5.10- kernel
|
||||
PCIPATH="$(echo "${PCIHEAD}" | grep -oE 'pci[0-9]{4}:[0-9]{2}' | sed 's/pci//' | cut -d':' -f2)" # 5.10- kernel
|
||||
fi
|
||||
PCISUBS=""
|
||||
for Q in $(echo "${PCIHEAD}" | grep -oE ":..\.."); do PCISUBS="${PCISUBS},${Q//:/}"; done
|
||||
@ -464,4 +464,4 @@ elif [ "${1}" = "late" ]; then
|
||||
SUPPORT_M2_POOL=$(_get_conf_kv support_m2_pool)
|
||||
_set_conf_kv hd "supportnvme" "${SUPPORTNVME}"
|
||||
_set_conf_kv hd "support_m2_pool" "${SUPPORT_M2_POOL}"
|
||||
fi
|
||||
fi
|
@ -88,13 +88,24 @@ echo -ne "Content-type: text/plain; charset=\"UTF-8\"\r\n\r\n"
|
||||
echo "Starting ttyd ..."
|
||||
MSG=""
|
||||
MSG="\${MSG}Arc Recovery Mode\n"
|
||||
MSG="\${MSG}\n"
|
||||
MSG="\${MSG}Using terminal commands to modify system configs, execute external binary\n"
|
||||
MSG="\${MSG}files, add files, or install unauthorized third-party apps may lead to system\n"
|
||||
MSG="\${MSG}damages or unexpected behavior, or cause data loss. Make sure you are aware of\n"
|
||||
MSG="\${MSG}the consequences of each command and proceed at your own risk.\n"
|
||||
MSG="\${MSG}\n"
|
||||
MSG="\${MSG}Warning: Data should only be stored in shared folders. Data stored elsewhere\n"
|
||||
MSG="\${MSG}may be deleted when the system is updated/restarted.\n"
|
||||
MSG="\${MSG}\n"
|
||||
MSG="\${MSG}To 'Force re-install DSM': http://<ip>:5000/web_install.html\n"
|
||||
MSG="\${MSG}To 'Reboot to Config Mode': http://<ip>:5000/webman/reboot_to_loader.cgi\n"
|
||||
MSG="\${MSG}To 'Show Boot Log': http://<ip>:5000/webman/get_logs.cgi\n"
|
||||
MSG="\${MSG}To 'Reboot Loader' : exec reboot\n"
|
||||
MSG="\${MSG}To 'Modify system files' : mount /dev/md0\n"
|
||||
echo -e "\${MSG}" > /etc/motd
|
||||
|
||||
/usr/bin/killall ttyd 2>/dev/null || true
|
||||
/usr/sbin/ttyd /usr/bin/ash -c "echo -e \"\${MSG}\"; ash" -l >/dev/null 2>&1 &
|
||||
/usr/sbin/ttyd -W -t titleFixed="Arc Recovery" login -f root >/dev/null 2>&1 &
|
||||
|
||||
echo "Starting dufs ..."
|
||||
/usr/bin/killall dufs 2>/dev/null || true
|
||||
@ -102,7 +113,7 @@ echo "Starting dufs ..."
|
||||
|
||||
cp -f /usr/syno/web/web_index.html /usr/syno/web/web_install.html
|
||||
cp -f /addons/web_index.html /usr/syno/web/web_index.html
|
||||
echo "Recovery mode is ready"
|
||||
echo "Arc Recovery mode is ready"
|
||||
EOF
|
||||
chmod +x /usr/syno/web/webman/recovery.cgi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user