Technical Tip

Disabling Broadcast Message when shutting down OES Linux Server

Author Info

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

tip
Reads:

725

Score:
4
4
1
 
Comments:

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

Author Info

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




User Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <strong> <cite> <code> <img><ul> <ol> <li> <div> <dl> <dt> <dd> <h1> <b> <strong> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
17 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.