Novell Home

Restarting NDS on OES Linux without the Novell Client Warning Message on Desktops

Novell Cool Solutions: Tip
By Eric Champagne

Digg This - Slashdot This

Posted: 11 May 2007
 

Problem:

Restarting NDS on OES Linux without the Novell Client prompt warning message on every desktop.

Solution:

Step by Step:

  1. cd /sbin
  2. touch restartnds
  3. vi restartnds
  4. copy this script into the file.
  5. #########################################
    #/bin/bash
    # description: Restart NDS without prompt
    # author:      Eric Champagne
    # version:     1.00
    # date:        05-07-2007
    
    maxcon=`ncpcon connection 2>/dev/null| sed -ne  "s/.*Connection Slots Allocated\t//pg"`
    
    count=0
    
    if [ "$1" == "disable" ]
    then
    disable=`ncpcon disable login 2>/dev/NULL`
    if echo $disable | grep "Login is now disabled" 1>/dev/null 2>&1
       then
           echo $disable
           echo dont forget to 'ncpcon enable login' if you dont bounce your server
       else
           echo 'ncpcon disable login' is not supported... hurry up to bounce the server...
       fi
    fi
    echo "Max Connections=$maxcon"
    
    while  [ $count -le $maxcon ]
    do
       ncpcon connection clear $count 1>/dev/null 2>&1
       count=`expr $count + 1`
    done
    echo All connections are cleared.
    rcndsd restart
    echo NDS is restarting!
    ###################################
  6. Save the file ( :wq! )

That's all !

Environment:

OES Linux + SUSE 9.3



Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell