This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
Hello All,
AIX 433 Netview 602 Framework 3.7.1
I wrote script that will execute when a node is added throught Event
configuration. However, the last part of the script executes a command
nsupdate8. For some strange reason if I send an trap (Node added/through server
setup) it goes through all the script fine but the last command does not seem
to work. I can successfully run the script and enter the variable (ip address)
from the command line and it will update the dns server. However, it seems that
when the script is run when node is added the "nsupdate8" does not update the
dns server. Is there something in Netview that will cause the nsupdate8 not to
run???
see attached script
#!/bin/ksh
#set -x
##############################################
# SCRIPT_NAME: query.sysname
# This script will get the sysname names of devices
##########################################################
#/usr/OV/bin/nvUtil l $1 > sysname
#for name in `cat sysname`
#do
# sysName=`/usr/OV/bin/snmpget -c tlc -t 100 $name system.sysName.0`
# NAMED=${sysName##*:}
# echo $name $NAMED
# echo $name $NAMED >> $1-names
#done
# echo You may view file $1-names
#exit 0
##########################################################################
# The commands below will get OID and determine which smart set $1
# belongs to
#/usr/OV/bin/nvUtil s `ovobjprint -s $1 | grep ^OBJECT: | awk '{print$NF}'`
##########################################################################
cat /dev/null > /listchm/dnsadd
OID=`/usr/OV/bin/ovobjprint -s $1 | grep ^OBJECT: | awk '{print $NF}'`
SMARTSET=`/usr/OV/bin/nvUtil s $OID`
SET=${SMARTSET##*:}
if [ $SET = NonSnmpDevices ]
then print $1 is a NON-SNMP Device >> /listchm/dnsadd
exit 0
fi
#########################################################################
# get system name of $1
##################################################################
sysName=`/usr/OV/bin/snmpget -c tlc -t 100 $1 system.sysName.0`
NAMED=${sysName##*:}
######################################################################
#Check to sys if its a win2k server
######################################################################
prefix=`echo $NAMED | cut -c 1-4`
typeset -u PREFIX=$prefix
if [ $PREFIX = CP2K ]
then
print $1 is a Win2K Server >> /listchm/dnsadd
exit 0
fi
name=${NAMED%%.*}
echo update add $name.test.local 86660 IN A $1 >> /listchm/dnsadd
echo " " >> /listchm/dnsadd
nsupdate8 /listchm/dnsadd
exit 0
Hello All,
AIX 433 Netview 602 Framework 3.7.1
I wrote script that will execute when a node is added throught
Event configuration. However, the last part of the script executes a command
nsupdate8. For some strange reason if I send an trap (Node added/through server
setup) it goes through all the script fine but the last command does not seem to
work. I can successfully run the script and enter the variable (ip address) from
the command line and it will update the dns server. However, it seems that when
the script is run when node is added the "nsupdate8" does not update the dns
server. Is there something in Netview that will cause the nsupdate8 not to
run???
see attached script
#!/bin/ksh #set
-x ############################################## # SCRIPT_NAME:
query.sysname # This script will get the sysname names of
devices ########################################################## #/usr/OV/bin/nvUtil
l $1 > sysname #for name in `cat sysname` #do #
sysName=`/usr/OV/bin/snmpget -c tlc -t 100 $name
system.sysName.0` #
NAMED=${sysName##*:} # echo $name
$NAMED # echo $name $NAMED >>
$1-names #done # echo You may view file
$1-names #exit
0 ########################################################################## #
The commands below will get OID and determine which smart set $1 # belongs
to #/usr/OV/bin/nvUtil s `ovobjprint -s $1 | grep ^OBJECT: | awk
'{print$NF}'` ########################################################################## cat
/dev/null > /listchm/dnsadd OID=`/usr/OV/bin/ovobjprint -s $1 | grep
^OBJECT: | awk '{print $NF}'` SMARTSET=`/usr/OV/bin/nvUtil s
$OID` SET=${SMARTSET##*:} if [ $SET = NonSnmpDevices ]
then print $1 is a NON-SNMP Device >> /listchm/dnsadd exit
0 fi ######################################################################### #
get system name of
$1 ################################################################## sysName=`/usr/OV/bin/snmpget
-c tlc -t 100 $1
system.sysName.0` NAMED=${sysName##*:} ###################################################################### #Check
to sys if its a win2k
server ###################################################################### prefix=`echo
$NAMED | cut -c 1-4` typeset -u PREFIX=$prefix if [ $PREFIX =
CP2K ] then
print $1 is a Win2K Server >>
/listchm/dnsadd exit 0
fi name=${NAMED%%.*} echo update add $name.test.local 86660 IN A $1
>> /listchm/dnsadd echo " " >> /listchm/dnsadd nsupdate8
/listchm/dnsadd exit 0
|
|