summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-01-23 16:50:00 +0000
committerKinsey Moore <kmoore@digium.com>2013-01-23 16:50:00 +0000
commitfa83a52b335b9e3696829a2f97b90d2d724f013b (patch)
treeb9d2607b370681e53cc8dc6cc1cb9095112e37ae /contrib
parent22ae23eed37ebd194025d0dd72b675ffcef70dc1 (diff)
Add support for DPMA to autosupport
This adds the ability to get the DPMA version, a listing of the local firmware directory, and indexes of configured remote directories. (closes issue AST-1070) Reported By: Malcolm Davenport Tested By: Kinsey Moore <kmoore@digium.com> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/autosupport28
1 files changed, 24 insertions, 4 deletions
diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 1d2e20874..db533a7f3 100644
--- a/contrib/scripts/autosupport
+++ b/contrib/scripts/autosupport
@@ -1,9 +1,9 @@
#!/bin/sh
#
-# Autosupport Version 2.0.18
+# Autosupport Version 2.0.19
# Collect support information
#
-# Copyright (C) 2005-2011, Digium, Inc.
+# Copyright (C) 2005-2013, Digium, Inc.
#
# Written by John Bigelow (support@digium.com)
# Charles Moye (cmoye@digium.com)
@@ -36,7 +36,7 @@ then
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
echo
echo "Digium autosupport script"
- echo "Copyright (C) 2005-2010, Digium, Inc."
+ echo "Copyright (C) 2005-2013, Digium, Inc."
echo "Licensed under the terms of the GNU General Public License"
echo
echo "usage: autosupport [prefix]"
@@ -187,7 +187,7 @@ if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
"core show uptime" "pri show spans" "misdn show stacks" "zap show channels" "dahdi show status" "dahdi show channels" \
"dahdi show channel 1" "core show channels" "skype show version" "skype show licenses" "skype show users" \
"skype show hostid" "show g729" "g729 show version" "g729 show licenses" "g729 show hostid" "fax show version" \
- "fax show licenses" "fax show hostid" "fax show stats"; do
+ "fax show licenses" "fax show hostid" "fax show stats" "digium_phones show version"; do
echo "asterisk -rx \"$command\"" >> $OUTPUT;
asterisk -rx "$command" >> $OUTPUT;
echo >> $OUTPUT;
@@ -388,6 +388,26 @@ for file in /lib/modules/$(uname -r)/build/.config /usr/src/linux/.config; do
done
echo >> $OUTPUT;
+FIRMWARE_DIR=`grep firmware_package_directory /etc/asterisk/res_digium_phone.conf|sed 's/;.*$//;'|grep firmware|sed 's/firmware_package_directory=//;'`;
+if [ `echo $FIRMWARE_DIR|egrep -v '^$'|wc -l` -eq "0" ]
+then
+ FIRMWARE_DIR="/var/www/firmware_package_directory"
+fi
+echo "------------------" >> $OUTPUT;
+echo "FIRMWARE LISTING: ls -al $FIRMWARE_DIR" >> $OUTPUT;
+echo "------------------" >> $OUTPUT;
+ls -al $FIRMWARE_DIR >> $OUTPUT;
+echo >> $OUTPUT;
+
+FIRMWARE_URLS=`grep file_url_prefix /etc/asterisk/res_digium_phone.conf|sed 's/;.*$//;'|grep file|sed 's/file_url_prefix=//;'`;
+for FIRMWARE_URL in $FIRMWARE_URLS; do
+ echo "------------------" >> $OUTPUT;
+ echo "REMOTE FIRMWARE LISTING: wget $FIRMWARE_URL" >> $OUTPUT;
+ echo "------------------" >> $OUTPUT;
+ wget "$FIRMWARE_URL" -O- 2>/dev/null >> $OUTPUT;
+ echo >> $OUTPUT;
+done
+
echo "done!"
}