Revert "Run ac_daemon from user-session as it requires X to function properly"
authorYin Kangkai <kangkai.yin@intel.com>
Mon, 19 Nov 2012 08:59:37 +0000 (16:59 +0800)
committerYin Kangkai <kangkai.yin@intel.com>
Mon, 19 Nov 2012 08:59:37 +0000 (16:59 +0800)
This reverts commit 7dd6b68dd1006e2fa77f94bb4af8d5879ad2f062.

Conflicts:

packaging/aul.spec

We will move back ac.service/amd from user session to system.

From the aul maintainer, /usr/bin/amd has to be run as root, reasons:

1. /usr/bin/amd sets app privilege.
2. /usr/bin/amd mounts cgroup subsystem.
3. When handling some command packets, caller's privilege should be checked.
   (Only amd can request terminate  and reset to applications)

Change-Id: Ie7b58f8b5ad6295c0321bb5d8ca9cfb3facdc50a
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
packaging/aul.spec

index c77f044..80b6db8 100644 (file)
@@ -73,16 +73,15 @@ 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 %SOURCE102 %{buildroot}%{_libdir}/systemd/system/ac.service
 ln -s ../launchpad-preload@.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/launchpad-preload@app.service
-
-mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
-install -m 0644 %SOURCE102 %{buildroot}%{_libdir}/systemd/user/ac.service
-ln -s ../ac.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/ac.service
+ln -s ../ac.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/ac.service
 
 
 %preun
 if [ $1 == 0 ]; then
     systemctl stop launchpad-preload@app.service
+    systemctl stop ac.service
 fi
 
 %post
@@ -90,6 +89,7 @@ fi
 systemctl daemon-reload
 if [ $1 == 1 ]; then
     systemctl restart launchpad-preload@app.service
+    systemctl restart ac.service
 fi
 
 %postun -p /sbin/ldconfig
@@ -115,14 +115,13 @@ systemctl daemon-reload
 /usr/share/aul/preexec_list.txt
 %{_bindir}/launchpad_preloading_preinitializing_daemon
 %{_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/user/tizen-middleware.target.wants/ac.service
-%{_libdir}/systemd/user/ac.service
+%{_libdir}/systemd/system/ac.service
 /usr/bin/amd
 /usr/bin/daemon-manager-release-agent
 /usr/bin/daemon-manager-launch-agent
 
-
 %files devel
 /usr/include/aul/*.h
 %{_libdir}/*.so