#!/bin/bash
#
# cisco_put.sh
#
# version 0.06
# date: 27.09.2008
# packetlevel.ch / chw
#
#
################################################################################################
#
# MYIP -> IP Address of the TFTP Server
# 
TFTPIP=192.168.2.100
#
# IP Address of the Cisco Devcie
#
IP=192.168.2.158
#
# or if you have a text file with ip addresses
#
# IP=`cat myiplist.txt`
#
#
# COMM -> RW community of the Cisco Devices (some old defaults are private)
#
COMM=private
#
# MAIN Loop -> gets a file with the name $TARGET.config from the tftp server to the Cisco Devices and copy its to startup config
#
for i in $IP ; 
do {
        echo $i 
        TARGET=$i
        snmpset -t 1 -c $COMM -v 1 $TARGET .1.3.6.1.4.1.9.2.1.53.$TFTPIP s "$TARGET.config"
        snmpset -t 1 -c $COMM -v 1 $TARGET .1.3.6.1.4.1.9.2.1.54.0 i 1
   } ; done
#
# end
#
