pari: branch 2.0 r4309 - /branches/2.0/scripts/detectdahdi

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Dec 8 15:18:56 CST 2008


Author: pari
Date: Mon Dec  8 15:18:55 2008
New Revision: 4309

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4309
Log:

Script to find wheter dahdi / zaptel is loaded.

And generate an include to read corresponding config file



Added:
    branches/2.0/scripts/detectdahdi   (with props)

Added: branches/2.0/scripts/detectdahdi
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/scripts/detectdahdi?view=auto&rev=4309
==============================================================================
--- branches/2.0/scripts/detectdahdi (added)
+++ branches/2.0/scripts/detectdahdi Mon Dec  8 15:18:55 2008
@@ -1,0 +1,24 @@
+#!/bin/sh
+
+OUTPUTFILE="/etc/asterisk/dahdi_guiread.conf"
+
+echo "" > ${OUTPUTFILE}
+echo "[general]" >> ${OUTPUTFILE}
+echo "" >> ${OUTPUTFILE}
+
+if [ -e /dev/zap ]; then
+	echo "zaptel"
+	echo "#include \"../zaptel.conf\"" >> ${OUTPUTFILE}
+	echo "" >> ${OUTPUTFILE}
+	exit 0
+fi
+
+if [ -e /dev/dahdi ]; then
+        echo "dahdi"
+	echo "#include \"../dahdi/system.conf\"" >> ${OUTPUTFILE}
+	echo "" >> ${OUTPUTFILE}
+	exit 0
+fi
+
+echo "None"
+exit 0

Propchange: branches/2.0/scripts/detectdahdi
------------------------------------------------------------------------------
    svn:executable = *




More information about the asterisk-gui-commits mailing list