Novell Home

Disabling Broadcast Message when shutting down OES Linux Server

Novell Cool Solutions: Tip
By Thomas Reibenwein

Digg This - Slashdot This

Posted: 23 Mar 2007
 

Problem:

When rebooting or shutting down an OES Linux server, eDirectory sends out a console broadcast to all connected users saying the server is going down.

Especially in a clustered environment this is an unwanted "feature", because the users aren't interested in cluster nodes but in cluster resources.

Running NetWare we would put a:

"DISABLE BROADCAST NOTIFICATIONS PROCESS = ON" into the file SYS:\SYSTEM\SHUTDOWN.NCF

Solution:

The cluster unload scripts shows us the way: we have to unbind NCP from the servers main ip address before ndsd stops.

Using some grep, awk, sed and wc commands we can find out what interface/ip address ndsd should listen to and if it's currently listening. Than we simply have to unbind NCP from that address.

To make this happen immediately before ndsd stops, we put the script in the file /etc/init.d/pre_ndsd_stop.

Example:

/etc/init.d/pre_ndsd_stop:

#!/bin/bash

# get the primary ndsd ip adress from /etc/nds.conf
ndsIPAdress=`ndsconfig get n4u.server.interfaces | awk -F= '{ print $2 }' | awk -F@ '{ print $1 }'`
ndsPort=`ndsconfig get n4u.server.interfaces | awk -F= '{ print $2 }' | awk -F@ '{ print $2 }'`

echo -n "  ndsd is configured on $ndsIPAdress port $ndsPort ... "

# check if port is open by ndsd
cnt=`netstat -lntp | grep $ndsIPAdress:$ndsPort | grep ndsd | wc -l | wc -l`
if [ $cnt -eq 1 ]
then
  echo "and listening!"
  echo "  now unbinding ncp from adress $ndsIPAdress on $HOSTNAME"
  # now unbind ndsd from the server with the primary adress using ncpcon
  /sbin/ncpcon unbind $HOSTNAME $ndsIPAdress
  echo "  done"
else
  echo "but NOT listening!"
fi

Environment:

  • OES Linux 1.0 SP2
  • eDirectory 8.7.3.x


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

© 2014 Novell