mirror of
https://github.com/rancher/os.git
synced 2025-09-01 23:04:41 +00:00
Merge pull request #1156 from ibuildthecloud/acpid
Support lid close in acpid
This commit is contained in:
3
images/02-acpid/Dockerfile
Normal file
3
images/02-acpid/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM rancher/os-base
|
||||||
|
COPY lid /etc/acpi/events/
|
||||||
|
COPY suspend.sh /etc/acpi/suspend.sh
|
2
images/02-acpid/lid
Normal file
2
images/02-acpid/lid
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
event=button/lid
|
||||||
|
action=/etc/acpi/suspend.sh %e
|
4
images/02-acpid/suspend.sh
Executable file
4
images/02-acpid/suspend.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ "$3" = "close" ]; then
|
||||||
|
echo -n "mem" > /sys/power/state
|
||||||
|
fi
|
@@ -83,7 +83,7 @@ rancher:
|
|||||||
services:
|
services:
|
||||||
{{if eq "amd64" .ARCH -}}
|
{{if eq "amd64" .ARCH -}}
|
||||||
acpid:
|
acpid:
|
||||||
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
|
image: {{.OS_REPO}}/os-acpid:{{.VERSION}}{{.SUFFIX}}
|
||||||
command: /usr/sbin/acpid -f
|
command: /usr/sbin/acpid -f
|
||||||
labels:
|
labels:
|
||||||
io.rancher.os.scope: system
|
io.rancher.os.scope: system
|
||||||
|
Reference in New Issue
Block a user