Skip to content

Commit 65e07c9

Browse files
committed
button.ko
1 parent 4d35a6f commit 65e07c9

File tree

8 files changed

+33
-11
lines changed

8 files changed

+33
-11
lines changed

redpill-acpid/acpid.tar.gz

-489 Bytes
Binary file not shown.

redpill-acpid/button.tgz

4 KB
Binary file not shown.

redpill-acpid/recipes/universal.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
{
44
"name": "install-acpid.sh",
55
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/src/install-acpid.sh",
6-
"sha256": "5b3e42a3907c00b1dd1ae31363a4ae648b88cda5b18cc39f3601548bb7af6a35",
6+
"sha256": "14dc21540359d883d38a43852c71892be27493f745300644e43b322b37d502df",
77
"packed": false
88
},
99
{
1010
"name": "acpid.tar.gz",
1111
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/acpid.tar.gz",
12-
"sha256": "2dfb078b54e63802c48393b1f488a4c7303a14c7ee3bd16c7f169e5fca661c73",
12+
"sha256": "00971456edf4ef0e14dfe7cfe35e9fb94143ff8fa3df4b572f6287def5e3598d",
13+
"packed": false
14+
},
15+
{
16+
"name": "button.tgz",
17+
"url": "https://github.com/jumkey/redpill-load/raw/develop/redpill-acpid/button.tgz",
18+
"sha256": "63886fa9804be08f8fd6c7a8a2fd70435a991bc2991d24510a44596f9f8858e3",
1319
"packed": false
1420
}
1521
],
13.1 KB
Binary file not shown.
13.1 KB
Binary file not shown.

redpill-acpid/src/install-acpid.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/sh
22

3+
# check button.ko
4+
if [ ! -f /tmpRoot/lib/modules/button.ko ]; then
5+
tar -zxvf button.tgz
6+
button_dir=$(uname -r)/$(cat /proc/syno_platform)
7+
if [ ! -f "${button_dir}/button.ko" ]; then
8+
echo "Error: ${button_dir}/button.ko not found, acpid may not work"
9+
else
10+
cp "${button_dir}/button.ko" /tmpRoot/lib/modules/
11+
fi
12+
fi
13+
314
# download files
415
#curl -L https://cdn.jsdelivr.net/gh/jumkey/redpill-load@develop/redpill-acpid/acpid.tar.gz -o /tmp/acpid.tar.gz
516

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

1021
# enable
1122
#systemctl enable acpid.service
12-
ln -sf /usr/lib/systemd/system/acpid.service /tmpRoot/etc/systemd/system/multi-user.target.wants/acpid.service
23+
ln -sf /usr/lib/systemd/system/acpid.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/acpid.service
1324

1425
# start
1526
#systemctl start acpid.service

redpill-acpid/src/package.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
tar -zcvf ../button.tgz -C button ./
4+
sha256sum ../button.tgz
5+
sha256sum install-acpid.sh
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[Unit]
22
Description=ACPI Daemon
3-
After=network.target
3+
DefaultDependencies=no
4+
IgnoreOnIsolate=true
5+
After=multi-user.target
46

57
[Service]
68
Type=forking
9+
Restart=always
10+
RestartSec=30
711
PIDFile=/var/run/acpid.pid
12+
ExecStartPre=/sbin/modprobe button
813
ExecStart=/usr/sbin/acpid
9-
ExecReload=/bin/kill -HUP $MAINPID
10-
Restart=always
11-
TimeoutStopSec=45
12-
13-
[Install]
14-
WantedBy=multi-user.target
14+
ExecStopPost=/sbin/modprobe -r button
1515

1616
[X-Synology]
17-
Name=ACPI
17+
Author=Virtualization Team

0 commit comments

Comments
 (0)