diff --git a/SIP11.9-4-2SR1-1S.loads b/SIP11.9-4-2SR1-1S.loads new file mode 100644 index 0000000..2b20953 Binary files /dev/null and b/SIP11.9-4-2SR1-1S.loads differ diff --git a/apps11.9-4-2ES9.sbn b/apps11.9-4-2ES9.sbn new file mode 100644 index 0000000..c3de922 Binary files /dev/null and b/apps11.9-4-2ES9.sbn differ diff --git a/cnu11.9-4-2ES9.sbn b/cnu11.9-4-2ES9.sbn new file mode 100644 index 0000000..47e38be Binary files /dev/null and b/cnu11.9-4-2ES9.sbn differ diff --git a/copstart.py b/copstart.py new file mode 100644 index 0000000..aae54b1 --- /dev/null +++ b/copstart.py @@ -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 +# +# 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) + diff --git a/copstart.sh b/copstart.sh new file mode 100644 index 0000000..d5f4f7c --- /dev/null +++ b/copstart.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# +# copstart.sh +# +# This script will install the firmware and device defaults +# +# SYNOPSIS +# copstart.sh +# +# 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 + diff --git a/cvm11sip.9-4-2ES9.sbn b/cvm11sip.9-4-2ES9.sbn new file mode 100644 index 0000000..72c36af Binary files /dev/null and b/cvm11sip.9-4-2ES9.sbn differ diff --git a/dsp11.9-4-2ES9.sbn b/dsp11.9-4-2ES9.sbn new file mode 100644 index 0000000..237a517 Binary files /dev/null and b/dsp11.9-4-2ES9.sbn differ diff --git a/jar11sip.9-4-2ES9.sbn b/jar11sip.9-4-2ES9.sbn new file mode 100644 index 0000000..ffa9532 Binary files /dev/null and b/jar11sip.9-4-2ES9.sbn differ diff --git a/load307.txt b/load307.txt new file mode 100644 index 0000000..039c065 --- /dev/null +++ b/load307.txt @@ -0,0 +1 @@ +307 SIP11.9-4-2SR1-1S 11 // IP Phone 7911G SIP diff --git a/load369.txt b/load369.txt new file mode 100644 index 0000000..e80205b --- /dev/null +++ b/load369.txt @@ -0,0 +1 @@ +369 SIP11.9-4-2SR1-1S 11 // IP Phone 7906G SIP diff --git a/term06.default.loads b/term06.default.loads new file mode 100644 index 0000000..135a606 Binary files /dev/null and b/term06.default.loads differ diff --git a/term11.default.loads b/term11.default.loads new file mode 100644 index 0000000..d2eba09 Binary files /dev/null and b/term11.default.loads differ