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

main/shutdown-clear-rtc-wakealarm: new aport

This contains an OpenRC service that clears the 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 e1efe181
No related branches found
No related tags found
No related merge requests found
# Maintainer: Arnav Singh <me@arnavion.dev>
pkgname=shutdown-clear-rtc-wakealarm
pkgver=1.0.0
pkgrel=0
pkgdesc="Pre-shutdown service to clear RTC wake alarm"
url="https://wiki.postmarketos.org/wiki/Shutdown-clear-rtc-wakealarm"
arch="noarch"
license="MIT"
source="
clear-rtc-wakealarm.shutdown.initd
"
package() {
install -Dm755 "$srcdir"/clear-rtc-wakealarm.shutdown.initd "$pkgdir"/etc/init.d/clear-rtc-wakealarm
}
sha512sums="
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