1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 06:11:12 +00:00

Merge pull request #1156 from ibuildthecloud/acpid

Support lid close in acpid
This commit is contained in:
Darren Shepherd
2016-08-17 09:06:47 -07:00
committed by GitHub
4 changed files with 10 additions and 1 deletions

View 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
View File

@@ -0,0 +1,2 @@
event=button/lid
action=/etc/acpi/suspend.sh %e

4
images/02-acpid/suspend.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
if [ "$3" = "close" ]; then
echo -n "mem" > /sys/power/state
fi

View File

@@ -83,7 +83,7 @@ rancher:
services:
{{if eq "amd64" .ARCH -}}
acpid:
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
image: {{.OS_REPO}}/os-acpid:{{.VERSION}}{{.SUFFIX}}
command: /usr/sbin/acpid -f
labels:
io.rancher.os.scope: system