Article

reibenwein's picture
article
Reads:

6043

Score:
4
4
1
 
Comments:

0

Disabling Broadcast Message when shutting down OES Linux Server

Author Info

23 March 2007 - 12:11am
Submitted by: reibenwein

(View Disclaimer)

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

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell