Skip to content

Commit

Permalink
button.ko
Browse files Browse the repository at this point in the history
  • Loading branch information
jumkey committed Jun 6, 2022
1 parent 4d35a6f commit 65e07c9
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 11 deletions.
Binary file modified redpill-acpid/acpid.tar.gz
Binary file not shown.
Binary file added redpill-acpid/button.tgz
Binary file not shown.
10 changes: 8 additions & 2 deletions redpill-acpid/recipes/universal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
{
"name": "install-acpid.sh",
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/src/install-acpid.sh",
"sha256": "5b3e42a3907c00b1dd1ae31363a4ae648b88cda5b18cc39f3601548bb7af6a35",
"sha256": "14dc21540359d883d38a43852c71892be27493f745300644e43b322b37d502df",
"packed": false
},
{
"name": "acpid.tar.gz",
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/acpid.tar.gz",
"sha256": "2dfb078b54e63802c48393b1f488a4c7303a14c7ee3bd16c7f169e5fca661c73",
"sha256": "00971456edf4ef0e14dfe7cfe35e9fb94143ff8fa3df4b572f6287def5e3598d",
"packed": false
},
{
"name": "button.tgz",
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/button.tgz",
"sha256": "63886fa9804be08f8fd6c7a8a2fd70435a991bc2991d24510a44596f9f8858e3",
"packed": false
}
],
Expand Down
Binary file not shown.
Binary file not shown.
13 changes: 12 additions & 1 deletion redpill-acpid/src/install-acpid.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/sh

# check button.ko
if [ ! -f /tmpRoot/lib/modules/button.ko ]; then
tar -zxvf button.tgz
button_dir=$(uname -r)/$(cat /proc/syno_platform)
if [ ! -f "${button_dir}/button.ko" ]; then
echo "Error: ${button_dir}/button.ko not found, acpid may not work"
else
cp "${button_dir}/button.ko" /tmpRoot/lib/modules/
fi
fi

# download files
#curl -L https://cdn.jsdelivr.net/gh/jumkey/redpill-load@develop/redpill-acpid/acpid.tar.gz -o /tmp/acpid.tar.gz

Expand All @@ -9,7 +20,7 @@ tar -zxvf acpid.tar.gz -C /tmpRoot/

# enable
#systemctl enable acpid.service
ln -sf /usr/lib/systemd/system/acpid.service /tmpRoot/etc/systemd/system/multi-user.target.wants/acpid.service
ln -sf /usr/lib/systemd/system/acpid.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/acpid.service

# start
#systemctl start acpid.service
5 changes: 5 additions & 0 deletions redpill-acpid/src/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

tar -zcvf ../button.tgz -C button ./
sha256sum ../button.tgz
sha256sum install-acpid.sh
16 changes: 8 additions & 8 deletions redpill-acpid/src/usr/lib/systemd/system/acpid.service
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[Unit]
Description=ACPI Daemon
After=network.target
DefaultDependencies=no
IgnoreOnIsolate=true
After=multi-user.target

[Service]
Type=forking
Restart=always
RestartSec=30
PIDFile=/var/run/acpid.pid
ExecStartPre=/sbin/modprobe button
ExecStart=/usr/sbin/acpid
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
TimeoutStopSec=45

[Install]
WantedBy=multi-user.target
ExecStopPost=/sbin/modprobe -r button

[X-Synology]
Name=ACPI
Author=Virtualization Team

0 comments on commit 65e07c9

Please sign in to comment.