mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
acpid: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
daac791eeb
commit
b2cc28366c
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/
|
||||
[ -d /tmpRoot/etc/acpi ] && rm -rf /tmpRoot/etc/acpi
|
||||
mv -f /tmpRoot/usr/etc/acpi /tmpRoot/etc/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user