[Spacewalk-list] Modification of spacewalk-service script

Pierre Casenove pcasenove at gmail.com
Thu Nov 3 07:40:58 UTC 2011


Hello all,
I was initially working on this issue :
https://www.redhat.com/archives/spacewalk-list/2011-August/msg00052.html
osa-dispatcher, on my SW 1.5 with postgresql installation, was complaining
that it couldn't connect to jabberd... and then reconnected 10 seconds
later.
Working on it, I found this at the beginning of the script:
if [ -x /etc/init.d/oracle ]; then
   DB_SERVICE="oracle"
fi

So, spacewalk-service does not start postgresql but only oracle...
I modified this to also control postgresql.... and as postgresql starts
between jabberd and osa-dispatcher, the message doesn't shows up anymore.
Of course, if the db is not local... the message will show up I guess.

Anyway, here is a patch for spacewalk-service to control postgresql if it
is running on localhost.

--- /root/spacewalk-service.orig        2011-11-03 07:26:36.235829360 +0000
+++ /usr/sbin/spacewalk-service 2011-11-03 07:39:39.465795746 +0000
@@ -22,6 +22,8 @@

 if [ -x /etc/init.d/oracle ]; then
    DB_SERVICE="oracle"
+elif [ -x /etc/init.d/postgresql ]; then
+   DB_SERVICE="postgresql"
 fi

 if [ -x /etc/init.d/tomcat5 ]; then

Hope this helps,

Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20111103/2324c4b1/attachment.htm>


More information about the Spacewalk-list mailing list