Skip to content
Snippets Groups Projects
Verified Commit 094df9c2 authored by Arnav Singh's avatar Arnav Singh
Browse files

main/device-pine64-pinephone: add shutdown service to clear RTC wake alarm

Users who don't want the RTC wake alarm to power on their phone from
powered-off state can use this service to clear the alarm during shutdown.

Fixes #1970
parent 92efdacf
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
# Co-Maintainer: Dylan Van Assche <me@dylanvanassche.be>
pkgname=device-pine64-pinephone
pkgver=0.45
pkgrel=0
pkgrel=1
pkgdesc="PINE64 PinePhone"
url="https://postmarketos.org"
license="MIT"
......@@ -62,6 +62,7 @@ source="
ucm/PinePhone.conf
ucm/VoiceCall.conf
ppkb.sh
clear-rtc-wakealarm.shutdown.initd
"
# workaround to purge the -elogind subpackage that was previously
# created/installed
......@@ -158,6 +159,9 @@ package() {
# Keyboard config
install -Dm755 "$srcdir"/ppkb.sh "$pkgdir"/etc/profile.d/ppkb.sh
# Pre-shutdown service to clear RTC wake alarm
install -Dm755 "$srcdir"/clear-rtc-wakealarm.shutdown.initd "$pkgdir"/etc/init.d/clear-rtc-wakealarm
}
nonfree_firmware() {
......@@ -243,4 +247,5 @@ f963898fa2ce66bc830e56feeec6ffc9888834e14cc1591d72908ef45ad82532bc3ef5fb32413e07
4b0c51ab169aebe8177c5c43eba41afa90370098a5a54e710d17e97ec1651869a20cb5d780a6132028c864916609e3b4f4a13158835310d0441bdb4915872372 PinePhone.conf
e093f71c37370927468de35a987150a3db3e1cc1c76c144bf58918a09c688c3da84303b5533241e691a6aa0758589e2a6498b1097974117782e909f0bbc6bf71 VoiceCall.conf
43f67e94491791685cdbb4874bb3034b1d297bdf3d23e7405c45ba8c58de72b4fb6a9943b79f46ef7b8f4dbc4d9db254ebec8eb3453d720a5a8fad277c6a9d88 ppkb.sh
4223d3050113b6bfefa1c11394c059db7632e4a12793c476f467b8d1f4a3e9716074a46482eb705ca09e34cec251d4d65d3c3fe428404f17c72ccffb93f2e873 clear-rtc-wakealarm.shutdown.initd
"
#!/sbin/openrc-run
description="Clear RTC wake alarm during shutdown"
# To use this service, add it to the shutdown runlevel with:
#
# rc-update add clear-rtc-wakealarm shutdown
start() {
echo 0 >/sys/class/rtc/rtc0/wakealarm
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment