From: Thierry Parmentelat <thierry.parmentelat@inria.fr>
Date: Tue, 22 Jan 2013 08:49:00 +0000 (+0100)
Subject: avoid using rpm - 2 more occurrences
X-Git-Tag: sfa-2.1-24~4^2~9
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=84891c976454296600fb4206964eb8f2dea2268f;p=sfa.git

avoid using rpm - 2 more occurrences
---

diff --git a/init.d/sfa b/init.d/sfa
index bde199de..31623144 100755
--- a/init.d/sfa
+++ b/init.d/sfa
@@ -160,7 +160,7 @@ function db_start () {
     # only if enabled
     [ "$SFA_DB_ENABLED" == 1 -o "$SFA_DB_ENABLED" == True ] || return
 
-    if ! rpm -q myplc >& /dev/null; then
+    if [ ! -f /etc/myplc-release ] ; then
 
 	######## standalone deployment - no colocated myplc
 
@@ -281,7 +281,7 @@ function db_stop () {
     [ "$SFA_DB_ENABLED" == 1 -o "$SFA_DB_ENABLED" == True ] || return
 
     # not too nice, but.. when co-located with myplc we'll let it start/stop postgresql
-    if ! rpm -q myplc >& /dev/null ; then
+    if [ ! -f /etc/myplc-release ] ; then
 	service postgresql stop >& /dev/null
 	check
 	MESSAGE=$"Stopping PostgreSQL server"