Change-Id: I903197dd2a70d470292fcfb25f8bd9e889285924
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
%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
%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