#! /bin/ksh
#
while read ord typ hn ip
do
#Define the IP address of the TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.1.0 s 146.170.71.103
#
touch /tftpboot/$ip.preconfigos
chmod 777 /tftpboot/$ip.preconfigos
#Define the TFTP filename
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s $ip.preconfigos
#
#define the supervisor module, module "1"
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.3.0 i 1
#
#Copy running configuration from CatOS to TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 3
#
#Copy config from TFTP server to CatOS
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 2
#
#Define the TFTP filename, "current-config" to the CatOS switch
snmpset -c xxxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s changeos
#
done
I do not receive any errors, yet I do not see my changes on the switch. All are cat os switches but models vary.
Output is
/tftpboot> dochange.sh
SNMPv2-SMI::enterprises.9.5.1.5.1.0 = STRING: "10.17.71.10"
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "back.cfg"
SNMPv2-SMI::enterprises.9.5.1.5.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "sendchanges"
Any ideas ?
#
while read ord typ hn ip
do
#Define the IP address of the TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.1.0 s 146.170.71.103
#
touch /tftpboot/$ip.preconfigos
chmod 777 /tftpboot/$ip.preconfigos
#Define the TFTP filename
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s $ip.preconfigos
#
#define the supervisor module, module "1"
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.3.0 i 1
#
#Copy running configuration from CatOS to TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 3
#
#Copy config from TFTP server to CatOS
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 2
#
#Define the TFTP filename, "current-config" to the CatOS switch
snmpset -c xxxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s changeos
#
done
I do not receive any errors, yet I do not see my changes on the switch. All are cat os switches but models vary.
Output is
/tftpboot> dochange.sh
SNMPv2-SMI::enterprises.9.5.1.5.1.0 = STRING: "10.17.71.10"
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "back.cfg"
SNMPv2-SMI::enterprises.9.5.1.5.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "sendchanges"
Any ideas ?