LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 04-Jun-2009, 01:55 PM
 
Join Date: Oct 2007
Location: Austria
Posts: 5,770
brunold 30-39 reputation pointsbrunold 30-39 reputation pointsbrunold 30-39 reputation pointsbrunold 30-39 reputation points
Send a message via ICQ to brunold Send a message via Skype™ to brunold
Default Re: ndsall services auto start during startup

s_novell,

sorry it took so long, but I have here a new version of that ndsall script that is linux standard based conform:

Code:
#!/bin/sh
#
# Start edirectory instances
# 
### BEGIN INIT INFO
# Provides:          ndsall
# Required-Start:    $network $local_fs $ALL
# Should-Start: 
# Required-Stop:    
# Should-Stop:
# Default-Start:     2 3 5
# Default-Stop:      2 3 5
# Short-Description: Start all eDirectory Instances
# Description:       Start all eDirectory Instances
### END INIT INFO
#
# First reset status of this service
. /etc/rc.status
rc_reset

# check if all binaries are available
NDSCMD='/opt/novell/eDirectory/bin/ndsmanage'
if [ ! -x "${NDSCMD}" ];
then
  echo -n "ndsall: Missing ${NDSCMD} ... Aborting ..."
  echo $rc_failed
  exit 2
fi

# check option
case "$1" in
  start)     echo -n "ndsall: Starting eDirectory Instances ..."
             ${NDSCMD} startall 
             if [ "$?" == "0" ];
             then
               echo $rc_done
             else
               echo $rc_failed
             fi
             ;;
  stop)      echo -n "ndsall: Stopping eDirectory Instances ..."
             ${NDSCMD} stopall
             if [ "$?" == "0" ];
             then
               echo $rc_done
             else
               echo $rc_failed
             fi
             ;;
  restart)   echo "ndsall: Restarting eDirectory Instances ..."
             $0 stop
             $0 start
             ;;
  *)         echo "Usage: $0 <action>"
             echo "actions: {start|stop|restart}"
             ;;
esac

Remove the links you created for the old ndsall file and move that file away. Then create a new file and copy the code above into it. Mark it as a executable (chmod +x ndsall) and insert it into the runlevels using "insserv ndsall". As the script above has the LSB header with the Default-Start, it will create all those links automatically.

After that reboot the server and see how it works.

Rainer
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 09:23 PM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2