[omniORB] init.d/Mandrake and omniNames

bjorn rohde jensen bjensen@fastmail.fm
Thu Sep 19 21:13:01 2002


Hi Frederic,

  I am a bit puzzled by your problems getting omniNames
to run under the init.d/service scripts. I have had no
problems on my mandrake box. There are a few things,
you should consider though. First of all omniNames does
not fork a new process like most daemons do, so you
have to do that in the script. The trick with nohup
or something similar is needed and should work for you,
there is probably some other problem.
  Try to have a look at my omniNames script, maybe it
can help you.

Yours sincerely,

Bjorn

[root@twilight root]# less /etc/init.d/omninames
#! /bin/sh
#
# chkconfig: - 55 45
# description:  Controls the omniORB CORBA Naming Service omniNames
# processname: omniNames

# script adapted from arpwatch script

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
   start)
         export LD_LIBRARY_PATH=/usr/local/omni/lib

         if [ -f /var/omninames/omninames-twilight.shadowland.dk.log ]
         then
             (
              /usr/local/omni/bin/omniNames -errlog /var/omninames/errors&
             )&
         else
            (
             /usr/local/omni/bin/omniNames -start -errlog 
/var/omninames/errors&
            )&
         fi
         echo
         ;;
   stop)
         killall omniNames
         echo
         ;;
   clear)
         $0 stop
         rm -rf /var/omninames/omninames-twilight.shadowland.dk.???
         rm -rf /var/omninames/errors
         echo
         ;;
   *)
         echo "Usage: omninames {start|stop|clear}"
         exit 1
esac

exit 0