Enable tlm when installing tlm-config-common package 79/31779/1
authorImran Zaman <imran.zaman@intel.com>
Tue, 9 Dec 2014 17:27:06 +0000 (19:27 +0200)
committerImran Zaman <imran.zaman@intel.com>
Tue, 9 Dec 2014 17:27:06 +0000 (19:27 +0200)
Change-Id: I903197dd2a70d470292fcfb25f8bd9e889285924
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
dists/rpm/tizen/packaging/tlm.spec
packaging/tlm.spec

index a1aaa6e..2c7beb9 100644 (file)
@@ -157,7 +157,24 @@ install -m 755 data/tizen-common/etc/session.d/* %{buildroot}%{_sysconfdir}/sess
 %postun -p /sbin/ldconfig
 
 
-%if "%{profile}" == "ivi"
+%if "%{profile}" != "ivi"
+
+%post config-common
+/usr/bin/systemctl enable tlm
+/usr/bin/systemctl daemon-reload
+
+%preun config-common
+if [ $1 == 0 ]; then
+  /usr/bin/systemctl disable tlm
+  /usr/bin/systemctl daemon-reload
+fi
+
+%postun config-common
+if [ -h /etc/tlm.conf ]; then
+rm -f /etc/tlm.conf
+fi
+
+%else
 
 %post config-ivi-singleseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
index a1aaa6e..2c7beb9 100644 (file)
@@ -157,7 +157,24 @@ install -m 755 data/tizen-common/etc/session.d/* %{buildroot}%{_sysconfdir}/sess
 %postun -p /sbin/ldconfig
 
 
-%if "%{profile}" == "ivi"
+%if "%{profile}" != "ivi"
+
+%post config-common
+/usr/bin/systemctl enable tlm
+/usr/bin/systemctl daemon-reload
+
+%preun config-common
+if [ $1 == 0 ]; then
+  /usr/bin/systemctl disable tlm
+  /usr/bin/systemctl daemon-reload
+fi
+
+%postun config-common
+if [ -h /etc/tlm.conf ]; then
+rm -f /etc/tlm.conf
+fi
+
+%else
 
 %post config-ivi-singleseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then