swap: changed the way to enable swap 25/52625/2
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 8 Jun 2015 04:51:04 +0000 (13:51 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 30 Nov 2015 04:21:24 +0000 (20:21 -0800)
1. Changed swap enabling method to systemd style.
2. Detected swap device by "disk label" to avoid fixing device node.

Change-Id: I499accbfcda622d391ca05a3e5481d38c84e087b
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
(cherry picked from commit d094496fd41e80b28fcab4de61d902012d2ec609)
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
filesystem/usr/lib/systemd/system/dev-disk-by\x2dlabel-emulator\x2dswap.swap [new file with mode: 0644]
filesystem/usr/lib/systemd/system/dev-vdb.swap [deleted file]
packaging/system-plugin-emulator.spec

diff --git a/filesystem/usr/lib/systemd/system/dev-disk-by\x2dlabel-emulator\x2dswap.swap b/filesystem/usr/lib/systemd/system/dev-disk-by\x2dlabel-emulator\x2dswap.swap
new file mode 100644 (file)
index 0000000..d4d5f12
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Swap on emulator
+
+[Swap]
+What=/dev/disk/by-label/emulator-swap
+
+[Install]
+WantedBy=emulator_preinit.target
diff --git a/filesystem/usr/lib/systemd/system/dev-vdb.swap b/filesystem/usr/lib/systemd/system/dev-vdb.swap
deleted file mode 100644 (file)
index 86ea802..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Swap on emulator
-
-[Swap]
-What=/dev/vdb
-
-[Install]
-WantedBy=emulator_preinit.target
index 6c7bf9f453f74b2164e49133332bec8b8f5a693f..ef1119b3a4793f41ffcfa2f5c85cc29ce4b669e6 100644 (file)
@@ -31,7 +31,7 @@ cp -arf filesystem/* %{buildroot}
 %install_service basic.target.wants emulator_preinit.target
 %install_service emulator_preinit.target.wants emul-setup-audio-volume.service
 %install_service emulator_preinit.target.wants emul-common-preinit.service
-%install_service emulator_preinit.target.wants dev-vdb.swap
+%install_service emulator_preinit.target.wants dev-disk-by\\x2dlabel-emulator\\x2dswap.swap
 %install_service multi-user.target.wants emulator.target
 %install_service basic.target.wants tizen-generate-env.service
 
@@ -61,10 +61,10 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 %{_unitdir}/multi-user.target.wants/emulator.target
 %{_unitdir}/emul-setup-audio-volume.service
 %{_unitdir}/emul-common-preinit.service
-%{_unitdir}/dev-vdb.swap
+%{_unitdir}/dev-disk-by\x2dlabel-emulator\x2dswap.swap
 %{_unitdir}/emulator_preinit.target.wants/emul-setup-audio-volume.service
 %{_unitdir}/emulator_preinit.target.wants/emul-common-preinit.service
-%{_unitdir}/emulator_preinit.target.wants/dev-vdb.swap
+%{_unitdir}/emulator_preinit.target.wants/dev-disk-by\x2dlabel-emulator\x2dswap.swap
 %{_unitdir}/tizen-generate-env.service
 %{_prefix}/lib/udev/rules.d/51-tizen-udev-default.rules
 %{_prefix}/lib/udev/rules.d/95-tizen-emulator.rules