summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-13 14:50:30 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-15 16:22:05 +0200
commita61c15efe444c8917da50264817b44cdcb775fc9 (patch)
tree816aef1c3c69b17f7e6740f20c6cf5195236e0b4 /meta-oe
parentfe76f1ab77c118e077d2c98f405b6b78ad35a124 (diff)
downloadmeta-openembedded-a61c15efe444c8917da50264817b44cdcb775fc9.tar.gz
zram: move systemd support from meta-systemd back to meta-oe
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/zram/zram/zram.service12
-rw-r--r--meta-oe/recipes-extended/zram/zram_0.1.bb13
2 files changed, 23 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/zram/zram/zram.service b/meta-oe/recipes-extended/zram/zram/zram.service
new file mode 100644
index 000000000..4a19367d9
--- /dev/null
+++ b/meta-oe/recipes-extended/zram/zram/zram.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Enable zram compressed in-memory swap.
3After=multi-user.target
4
5[Service]
6RemainAfterExit=yes
7ExecStart=/usr/bin/zram-load.sh --load
8ExecStop=/usr/bin/zram-load.sh --unload
9Type=oneshot
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-oe/recipes-extended/zram/zram_0.1.bb b/meta-oe/recipes-extended/zram/zram_0.1.bb
index 85262647c..115e6437f 100644
--- a/meta-oe/recipes-extended/zram/zram_0.1.bb
+++ b/meta-oe/recipes-extended/zram/zram_0.1.bb
@@ -2,22 +2,31 @@ DESCRIPTION = "Linux zram compressed in-memory swap"
2LICENSE = "MIT" 2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" 3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
4 4
5inherit allarch update-rc.d 5inherit allarch update-rc.d systemd
6 6
7RDEPENDS_${PN} = "util-linux-swaponoff kmod kernel-module-zram" 7RDEPENDS_${PN} = "util-linux-swaponoff kmod kernel-module-zram"
8 8
9PR = "r0" 9PR = "r3"
10 10
11SRC_URI = " \ 11SRC_URI = " \
12 file://init \ 12 file://init \
13 file://zram.service \
13 " 14 "
14 15
15do_install () { 16do_install () {
16 # Sysvinit 17 # Sysvinit
17 install -d ${D}${sysconfdir}/init.d 18 install -d ${D}${sysconfdir}/init.d
18 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram 19 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
20
21 install -d ${D}${systemd_unitdir}/system
22 install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
19} 23}
20 24
21FILES_${PN} = "${sysconfdir}/init.d" 25FILES_${PN} = "${sysconfdir}/init.d"
22INITSCRIPT_NAME = "zram" 26INITSCRIPT_NAME = "zram"
23INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ." 27INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ."
28
29RPROVIDES_${PN} += "${PN}-systemd"
30RREPLACES_${PN} += "${PN}-systemd"
31RCONFLICTS_${PN} += "${PN}-systemd"
32SYSTEMD_SERVICE_${PN} = "zram.service"