packaging: fix update installation 12/32112/1 accepted/tizen/common/20141216.093630 accepted/tizen/tv/20141217.013056 accepted/tizen/wearable/20141217.020652 submit/tizen/20141215.155324 submit/tizen_ivi/20141215.444555
authorImran Zaman <imran.zaman@intel.com>
Mon, 15 Dec 2014 15:50:56 +0000 (17:50 +0200)
committerImran Zaman <imran.zaman@intel.com>
Mon, 15 Dec 2014 15:50:56 +0000 (17:50 +0200)
Change-Id: If0465177edd7e94ee98f6bbc4037e18581a3fa75
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
dists/rpm/tizen/packaging/tlm.spec
packaging/tlm.spec

index 9385a6a..38ef4e5 100644 (file)
@@ -168,20 +168,20 @@ systemctl daemon-reload
 
 %preun config-common
 if [ $1 == 0 ]; then
-  systemctl disable tlm
-  systemctl daemon-reload
+       systemctl disable tlm
+       systemctl daemon-reload
 fi
 
 %postun config-common
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 %else
 
 %post config-ivi-singleseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-singleseat.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-singleseat.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -193,14 +193,14 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-singleseat
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 
 %post config-ivi-multiseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-multiseat.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-multiseat.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -212,14 +212,14 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-multiseat
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 
 %post config-ivi-vtc1010
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-vtc1010.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-vtc1010.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -231,8 +231,8 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-vtc1010
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 %endif
index 9385a6a..38ef4e5 100644 (file)
@@ -168,20 +168,20 @@ systemctl daemon-reload
 
 %preun config-common
 if [ $1 == 0 ]; then
-  systemctl disable tlm
-  systemctl daemon-reload
+       systemctl disable tlm
+       systemctl daemon-reload
 fi
 
 %postun config-common
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 %else
 
 %post config-ivi-singleseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-singleseat.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-singleseat.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -193,14 +193,14 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-singleseat
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 
 %post config-ivi-multiseat
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-multiseat.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-multiseat.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -212,14 +212,14 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-multiseat
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 
 %post config-ivi-vtc1010
 if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
-ln -s -f /etc/tlm-vtc1010.conf /etc/tlm.conf
+       ln -s -f /etc/tlm-vtc1010.conf /etc/tlm.conf
 fi
 systemctl enable tlm
 systemctl daemon-reload
@@ -231,8 +231,8 @@ if [ $1 == 0 ]; then
 fi
 
 %postun config-ivi-vtc1010
-if [ -h /etc/tlm.conf ]; then
-rm -f /etc/tlm.conf
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
 fi
 
 %endif