From dfca2a77e77836aa998d8114eb24e99f96813015 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Tue, 14 Aug 2012 10:13:33 +0900 Subject: [PATCH] Convert launchpad-preload systemd service to instantiated unit Applications launched from lauchpad (aul_ utility functions) expect to see the same environment as in user-session@app.service. This commit brings launchpad's environment in line with user-session@. Change-Id: Idc928505aff139fc664b8209c53ad51ddadc67b4 --- packaging/aul.spec | 14 +++++++------- ...aunchpad-preload.service => launchpad-preload@.service} | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) rename packaging/{launchpad-preload.service => launchpad-preload@.service} (65%) diff --git a/packaging/aul.spec b/packaging/aul.spec index 402fce2..647ccd1 100644 --- a/packaging/aul.spec +++ b/packaging/aul.spec @@ -5,7 +5,7 @@ Release: 1 Group: System/Libraries License: Apache License, Version 2.0 Source0: %{name}-%{version}.tar.gz -Source101: launchpad-preload.service +Source101: launchpad-preload@.service Source102: ac.service Requires(post): /sbin/ldconfig @@ -69,15 +69,15 @@ sqlite3 %{buildroot}/opt/dbspace/.mida.db < %{buildroot}/usr/share/aul/mida_db.s rm -rf %{buildroot}/usr/share/aul/mida_db.sql mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants -install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/launchpad-preload.service +install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/launchpad-preload@.service install -m 0644 %SOURCE102 %{buildroot}%{_libdir}/systemd/system/ac.service -ln -s ../launchpad-preload.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/launchpad-preload.service +ln -s ../launchpad-preload@.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/launchpad-preload@app.service ln -s ../ac.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/ac.service %preun if [ $1 == 0 ]; then - systemctl stop launchpad-preload.service + systemctl stop launchpad-preload@app.service systemctl stop ac.service fi @@ -85,7 +85,7 @@ fi /sbin/ldconfig systemctl daemon-reload if [ $1 == 1 ]; then - systemctl restart launchpad-preload.service + systemctl restart launchpad-preload@app.service systemctl restart ac.service fi @@ -111,9 +111,9 @@ systemctl daemon-reload /usr/share/aul/preexec_list.txt %{_bindir}/launchpad_preloading_preinitializing_daemon %{_bindir}/ac_daemon -%{_libdir}/systemd/system/multi-user.target.wants/launchpad-preload.service +%{_libdir}/systemd/system/multi-user.target.wants/launchpad-preload@app.service %{_libdir}/systemd/system/multi-user.target.wants/ac.service -%{_libdir}/systemd/system/launchpad-preload.service +%{_libdir}/systemd/system/launchpad-preload@.service %{_libdir}/systemd/system/ac.service %files devel diff --git a/packaging/launchpad-preload.service b/packaging/launchpad-preload@.service similarity index 65% rename from packaging/launchpad-preload.service rename to packaging/launchpad-preload@.service index d463788..3ce1144 100644 --- a/packaging/launchpad-preload.service +++ b/packaging/launchpad-preload@.service @@ -3,7 +3,9 @@ Description=Start the preload/preinit daemon [Service] EnvironmentFile=/etc/sysconfig/tizen-mobile-ui +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket Environment=DISPLAY=:0 +Environment=XDG_RUNTIME_DIR=/run/user/%I ExecStart=/usr/bin/launchpad_preloading_preinitializing_daemon [Install] -- 2.7.4