zram: Add systemd service for zram

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Andrei Gherzan
2012-09-18 19:35:24 +00:00
committed by Koen Kooi
parent d6055c8e44
commit 72e6ed1469
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,12 @@
[Unit]
Description=Enable zram compressed in-memory swap.
After=multi-user.target
[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/zram-load.sh --load
ExecStop=/usr/bin/zram-load.sh --unload
Type=oneshot
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PRINC := "${@int(PRINC) + 1}"
inherit systemd
SRC_URI += " \
file://zram.service \
"
SYSTEMD_PACKAGES = "${PN}-systemd"
SYSTEMD_SERVICE_${PN}-systemd = "zram.service"