Cool Solutions

Disabling Broadcast Message when shutting down OES Linux Server



By:

March 23, 2007 1:11 am

Reads: 6407

Comments:0

Score:0

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
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: This content is not supported by Novell. 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 it thoroughly before using it in a production environment.

Comment

RSS