diff --git a/redpill-acpid/acpid.tar.gz b/redpill-acpid/acpid.tar.gz index 5e98ea30a..df04e68ad 100644 Binary files a/redpill-acpid/acpid.tar.gz and b/redpill-acpid/acpid.tar.gz differ diff --git a/redpill-acpid/button.tgz b/redpill-acpid/button.tgz new file mode 100644 index 000000000..59fa226d1 Binary files /dev/null and b/redpill-acpid/button.tgz differ diff --git a/redpill-acpid/recipes/universal.json b/redpill-acpid/recipes/universal.json index 568568dd4..f0fd8a279 100644 --- a/redpill-acpid/recipes/universal.json +++ b/redpill-acpid/recipes/universal.json @@ -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 } ], diff --git a/redpill-acpid/src/button/4.4.180+/BROADWELL/button.ko b/redpill-acpid/src/button/4.4.180+/BROADWELL/button.ko new file mode 100644 index 000000000..9a543e315 Binary files /dev/null and b/redpill-acpid/src/button/4.4.180+/BROADWELL/button.ko differ diff --git a/redpill-acpid/src/button/4.4.180+/BROADWELLNK/button.ko b/redpill-acpid/src/button/4.4.180+/BROADWELLNK/button.ko new file mode 100755 index 000000000..6a56d3ba5 Binary files /dev/null and b/redpill-acpid/src/button/4.4.180+/BROADWELLNK/button.ko differ diff --git a/redpill-acpid/src/install-acpid.sh b/redpill-acpid/src/install-acpid.sh index 74d4bb1fc..25e311750 100644 --- a/redpill-acpid/src/install-acpid.sh +++ b/redpill-acpid/src/install-acpid.sh @@ -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 @@ -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 diff --git a/redpill-acpid/src/package.sh b/redpill-acpid/src/package.sh new file mode 100644 index 000000000..1a803c077 --- /dev/null +++ b/redpill-acpid/src/package.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +tar -zcvf ../button.tgz -C button ./ +sha256sum ../button.tgz +sha256sum install-acpid.sh diff --git a/redpill-acpid/src/usr/lib/systemd/system/acpid.service b/redpill-acpid/src/usr/lib/systemd/system/acpid.service index 9693d2103..ca63cd456 100644 --- a/redpill-acpid/src/usr/lib/systemd/system/acpid.service +++ b/redpill-acpid/src/usr/lib/systemd/system/acpid.service @@ -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