mirror of
https://github.com/dannymcc/Cisco-7906G-SIP.git
synced 2024-11-24 04:28:00 +01:00
Add firmware files
This commit is contained in:
parent
d1591e4bf7
commit
6e22267ce7
12 changed files with 203 additions and 0 deletions
BIN
SIP11.9-4-2SR1-1S.loads
Normal file
BIN
SIP11.9-4-2SR1-1S.loads
Normal file
Binary file not shown.
BIN
apps11.9-4-2ES9.sbn
Normal file
BIN
apps11.9-4-2ES9.sbn
Normal file
Binary file not shown.
BIN
cnu11.9-4-2ES9.sbn
Normal file
BIN
cnu11.9-4-2ES9.sbn
Normal file
Binary file not shown.
118
copstart.py
Normal file
118
copstart.py
Normal file
|
@ -0,0 +1,118 @@
|
|||
#
|
||||
# Copyright (c) 2005,2008 Cisco Systems Inc. All rights
|
||||
# reserved.
|
||||
#
|
||||
# ######################################################################
|
||||
#
|
||||
# copstart.py
|
||||
#
|
||||
# This script will install the firmware and device defaults
|
||||
#
|
||||
# SYNOPSIS
|
||||
# python copstart.py <context> <logfile>
|
||||
#
|
||||
# created: 2007-10-29
|
||||
# author: Mahesh Gopalakrishna Pai R (mapai@cisco.com)
|
||||
# ######################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import socket
|
||||
|
||||
#
|
||||
# Checking parameters
|
||||
#
|
||||
if len(sys.argv) < 2:
|
||||
CONTEXT="options"
|
||||
else:
|
||||
CONTEXT=sys.argv[1]
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
LOGFILE="install.log"
|
||||
else:
|
||||
LOGFILE=sys.argv[2]
|
||||
|
||||
#
|
||||
# Set some env variables
|
||||
#
|
||||
# Context will be either options (default), install or L2
|
||||
#
|
||||
TMPDIR="C:\\cisco\\common\\download"
|
||||
TFTPDIR="C:\\Cisco\\cm\\tftp"
|
||||
LOADINFODIR="C:\\Cisco\\cm\\db\\loadinfo"
|
||||
INSTALLDB="C:\\Cisco\\cm\\bin\\installdb"
|
||||
|
||||
##### Executes commands
|
||||
def syscmd(cmd):
|
||||
rc = os.system(cmd)
|
||||
os.system("echo Executing [%s]" % cmd)
|
||||
if rc != 0:
|
||||
os.system("echo Error executing [%s] returned [%s]" % (cmd, rc))
|
||||
return rc
|
||||
|
||||
#
|
||||
# Change permissions and copy files
|
||||
#
|
||||
syscmd("echo Installing *.sbn, *.loads and load info files")
|
||||
|
||||
# Permissions
|
||||
ACL_PATH=TMPDIR + "\\*.sbn"
|
||||
print ('Setting ACLs for "%s"' % ACL_PATH)
|
||||
syscmd('cmcacls "%s" /T /C /E /P ctftp:F ' % (ACL_PATH))
|
||||
syscmd('cmcacls "%s" /T /C /E /P database:F ' % (ACL_PATH))
|
||||
syscmd('cmcacls "%s" /T /C /E /P ccmbase-group:F ' % (ACL_PATH))
|
||||
|
||||
ACL_PATH=TMPDIR + "\\*.loads"
|
||||
print ('Setting ACLs for "%s"' % ACL_PATH)
|
||||
syscmd('cmcacls "%s" /T /C /E /P ctftp:F ' % (ACL_PATH))
|
||||
syscmd('cmcacls "%s" /T /C /E /P database:F ' % (ACL_PATH))
|
||||
syscmd('cmcacls "%s" /T /C /E /P ccmbase-group:F ' % (ACL_PATH))
|
||||
|
||||
ACL_PATH=TMPDIR + "\\*.txt"
|
||||
print ('Setting ACLs for "%s"' % ACL_PATH)
|
||||
syscmd('cmcacls "%s" /T /C /E /P administrator:F ' % (ACL_PATH))
|
||||
syscmd('cmcacls "%s" /T /C /E /P administrators:F ' % (ACL_PATH))
|
||||
|
||||
# Copy Files
|
||||
syscmd("copy /y " + TMPDIR + "\\*.txt " + LOADINFODIR + "\\")
|
||||
syscmd("copy /y " + TMPDIR + "\\*.sbn " + TFTPDIR + "\\")
|
||||
syscmd("copy /y " + TMPDIR + "\\*.loads " + TFTPDIR + "\\")
|
||||
|
||||
#
|
||||
# Remove any old TERMxx.DEFAULT.loads files
|
||||
#
|
||||
syscmd("echo Cleaning up TERMxx.DEFAULT.loads files...")
|
||||
fileList = os.popen("dir /b %s\\term*.default.loads" %(TMPDIR))
|
||||
while 1:
|
||||
fileName = fileList.readline()
|
||||
if not fileName:
|
||||
break
|
||||
model=fileName.upper().split("M")[1].split(".")[0].strip()
|
||||
syscmd("del /f " + TFTPDIR + "\\TERM" + model + ".DEFAULT.loads")
|
||||
|
||||
#
|
||||
# Update the device defaults
|
||||
#
|
||||
syscmd("echo Updating device defaults...")
|
||||
syscmd("echo from load files in " + TMPDIR)
|
||||
|
||||
# Context equals 'L2', 'options' or 'install'
|
||||
if CONTEXT != "L2":
|
||||
syscmd("echo Updating device defaults for non-L2")
|
||||
L2_OPT=""
|
||||
else:
|
||||
syscmd("echo Updating device defaults for L2")
|
||||
L2_OPT=L2
|
||||
|
||||
fileList = os.popen("dir /b " + TMPDIR + "\\*.txt")
|
||||
exitCode=0
|
||||
while 1:
|
||||
fileName = fileList.readline()
|
||||
if not fileName:
|
||||
break
|
||||
rc=syscmd("C:\\INFORMIX\\" + socket.gethostname().replace('-','_') + "_ccm.cmd && " + INSTALLDB + " -l " + TMPDIR + "\\" + fileName )
|
||||
if rc != 0:
|
||||
exitCode=rc
|
||||
|
||||
sys.exit(exitCode)
|
||||
|
83
copstart.sh
Normal file
83
copstart.sh
Normal file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# copstart.sh
|
||||
#
|
||||
# This script will install the firmware and device defaults
|
||||
#
|
||||
# SYNOPSIS
|
||||
# copstart.sh <context> <logfile>
|
||||
#
|
||||
# turn it on for debug
|
||||
#set x
|
||||
|
||||
#
|
||||
# Checking parameters
|
||||
#
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
CONTEXT="options"
|
||||
else
|
||||
CONTEXT=$1
|
||||
fi
|
||||
#
|
||||
# Set some env variables
|
||||
#
|
||||
# Context will be either options (default), install or L2
|
||||
#
|
||||
TMPDIR=`pwd`
|
||||
LOGFILE=${TMPDIR}/install.log
|
||||
TFTPDIR=/usr/local/cm/tftp
|
||||
LOADINFODIR=/usr/local/cm/db/loadinfo
|
||||
INSTALLDB=/usr/local/cm/bin/installdb
|
||||
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cm/lib
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
#
|
||||
# Copy files and change permissions
|
||||
#
|
||||
echo "Installing *.sbn, *.loads and load info files" > ${LOGFILE}
|
||||
/bin/chmod 770 ${TMPDIR}/*.txt ${TMPDIR}/*.sbn ${TMPDIR}/*.loads
|
||||
|
||||
/bin/chown ctftp ${TMPDIR}/*.sbn ${TMPDIR}/*.loads
|
||||
/bin/chown database ${TMPDIR}/*.txt
|
||||
|
||||
/bin/chgrp ccmbase ${TMPDIR}/*.txt ${TMPDIR}/*.loads ${TMPDIR}/*.sbn
|
||||
|
||||
/bin/cp -fp ${TMPDIR}/*.txt ${LOADINFODIR}/
|
||||
/bin/cp -fp ${TMPDIR}/*.sbn ${TFTPDIR}/
|
||||
/bin/cp -fp ${TMPDIR}/*.loads ${TFTPDIR}/
|
||||
|
||||
#
|
||||
# Remove any old TERMxx.DEFAULT.loads files
|
||||
#
|
||||
echo "Cleaning up TERMxx.DEFAULT.loads files..." >> ${LOGFILE}
|
||||
term_default_files="`/bin/ls term*.default.loads`"
|
||||
for term_default_file in $term_default_files
|
||||
do
|
||||
model="`echo $term_default_file | /bin/cut -c5- | /bin/cut -d. -f1`"
|
||||
/bin/rm -f ${TFTPDIR}/TERM$model.DEFAULT.loads
|
||||
done
|
||||
|
||||
#
|
||||
# Update the device defaults
|
||||
#
|
||||
echo "Updating device defaults..." >> ${LOGFILE}
|
||||
echo "from load files in ${TMPDIR}" >> ${LOGFILE}
|
||||
load_files="`/bin/ls ${TMPDIR}/*.txt`";
|
||||
|
||||
# Context equals 'L2', 'options' or 'install'
|
||||
if [ ${CONTEXT} != "L2" ]
|
||||
then
|
||||
echo "Updating device defaults for non-L2" >> ${LOGFILE}
|
||||
L2_OPT=
|
||||
else
|
||||
echo "Updating device defaults for L2" >> ${LOGFILE}
|
||||
L2_OPT=L2
|
||||
fi
|
||||
for load_file in $load_files
|
||||
do
|
||||
/bin/su -l informix -s /bin/sh -c "source /usr/local/cm/db/dblenv.bash /usr/local/cm ; source /usr/local/cm/db/informix/local/ids.env ${L2_OPT}; $INSTALLDB -l $load_file" >> ${LOGFILE}
|
||||
done
|
||||
exit 0
|
||||
|
BIN
cvm11sip.9-4-2ES9.sbn
Normal file
BIN
cvm11sip.9-4-2ES9.sbn
Normal file
Binary file not shown.
BIN
dsp11.9-4-2ES9.sbn
Normal file
BIN
dsp11.9-4-2ES9.sbn
Normal file
Binary file not shown.
BIN
jar11sip.9-4-2ES9.sbn
Normal file
BIN
jar11sip.9-4-2ES9.sbn
Normal file
Binary file not shown.
1
load307.txt
Normal file
1
load307.txt
Normal file
|
@ -0,0 +1 @@
|
|||
307 SIP11.9-4-2SR1-1S 11 // IP Phone 7911G SIP
|
1
load369.txt
Normal file
1
load369.txt
Normal file
|
@ -0,0 +1 @@
|
|||
369 SIP11.9-4-2SR1-1S 11 // IP Phone 7906G SIP
|
BIN
term06.default.loads
Normal file
BIN
term06.default.loads
Normal file
Binary file not shown.
BIN
term11.default.loads
Normal file
BIN
term11.default.loads
Normal file
Binary file not shown.
Loading…
Reference in a new issue