Introduce path activation for starter programme
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 3 Jan 2013 16:25:54 +0000 (17:25 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 7 Jan 2013 13:25:49 +0000 (14:25 +0100)
It appears interdomain (user session vs. system) dependencies
does not work correctly in systemd. amd creates /tmp/amd_ready
file when it is ready to accept connections. We can depend on
it and start the starter when the file appears.

Change-Id: Ie6bd20b31703f6236a10a28d20b0fc68a278d97f
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
packaging/starter.path [new file with mode: 0644]
packaging/starter.spec

diff --git a/packaging/starter.path b/packaging/starter.path
new file mode 100644 (file)
index 0000000..724239c
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Path activation for the "starter" programme
+
+[Path]
+PathExists=/tmp/amd_ready
index dd75dbe..450678b 100755 (executable)
@@ -6,6 +6,7 @@ Group:      TO_BE/FILLED_IN
 License:    TO_BE/FILLED_IN
 Source0:    starter-%{version}.tar.gz
 Source1:    starter.service
+Source2:    starter.path
 Requires(post): /usr/bin/vconftool
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(ail)
@@ -56,7 +57,8 @@ rm -rf %{buildroot}
 
 mkdir -p %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants
 install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/user/
-ln -s ../starter.service %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants/starter.service
+install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/user/
+ln -s ../starter.path %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants/starter.path
 mkdir -p %{buildroot}/usr/share/license
 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/opt/data/home-daemon
@@ -105,7 +107,8 @@ sync
 /usr/ug/lib/libug-lockscreen-options.so
 /usr/ug/lib/libug-lockscreen-options.so.0.1.0
 /usr/ug/res/locale/*/LC_MESSAGES/*
+%{_libdir}/systemd/user/starter.path
 %{_libdir}/systemd/user/starter.service
-%{_libdir}/systemd/user/core-efl.target.wants/starter.service
+%{_libdir}/systemd/user/core-efl.target.wants/starter.path
 /usr/share/license/%{name}
 /opt/data/home-daemon