[Pkg-voip-commits] r2723 - in destar/trunk/debian: . patches
Alejandro Rios P.
alerios-guest at alioth.debian.org
Wed Nov 22 00:11:27 CET 2006
Author: alerios-guest
Date: 2006-11-22 00:11:27 +0100 (Wed, 22 Nov 2006)
New Revision: 2723
Added:
destar/trunk/debian/patches/zaptel.dpatch
Modified:
destar/trunk/debian/README.Debian
destar/trunk/debian/changelog
destar/trunk/debian/patches/00list
destar/trunk/debian/postinst
Log:
* Check for permisions on /etc/zaptel.conf file before writing it, and
ommit it if it can't be written, incluiding a user warning.
Modified: destar/trunk/debian/README.Debian
===================================================================
--- destar/trunk/debian/README.Debian 2006-11-21 23:10:05 UTC (rev 2722)
+++ destar/trunk/debian/README.Debian 2006-11-21 23:11:27 UTC (rev 2723)
@@ -26,6 +26,9 @@
You can change the default port at /etc/init.d/destar, see destar(8) man
page to see daemon options.
+If you need zaptel device configuration support, you have to enable
+write access to the /etc/zaptel.conf file for the asterisk group.
+
CDR records and statistics won't be completly usable if asterisk module
cdr_sqlite3_custom is not present. The module is included on asterisk debian
package version >= 1.2.13. If you are using a custom asterisk installation,
Modified: destar/trunk/debian/changelog
===================================================================
--- destar/trunk/debian/changelog 2006-11-21 23:10:05 UTC (rev 2722)
+++ destar/trunk/debian/changelog 2006-11-21 23:11:27 UTC (rev 2723)
@@ -7,8 +7,9 @@
[Alejandro Rios P.]
* Added update-alternatives stuff for op-panel.
- * Tested and fixed op-panel integration (Closes: #393725).
- * Create /etc/zaptel.conf file before usage (Closes: #398467).
+ * Tested and fixed op-panel integration with help from Julien Blache (Closes: #393725).
+ * Check for permisions on /etc/zaptel.conf file before writing it, and ommit
+ it if it can't be written, incluiding a user warning (Closes: #398467).
* Improved README.Debian
* Use /etc/asterisk/manager.d/destar.conf instead of
/etc/asterisk/manager.conf
Modified: destar/trunk/debian/patches/00list
===================================================================
--- destar/trunk/debian/patches/00list 2006-11-21 23:10:05 UTC (rev 2722)
+++ destar/trunk/debian/patches/00list 2006-11-21 23:11:27 UTC (rev 2723)
@@ -2,3 +2,4 @@
op_panel.dpatch
manager.dpatch
example.dpatch
+zaptel.dpatch
Added: destar/trunk/debian/patches/zaptel.dpatch
===================================================================
--- destar/trunk/debian/patches/zaptel.dpatch 2006-11-21 23:10:05 UTC (rev 2722)
+++ destar/trunk/debian/patches/zaptel.dpatch 2006-11-21 23:11:27 UTC (rev 2723)
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## zaptel.dpatch by Alejandro Rios P. <alejandro.rios at avatar.com.co>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad destar-0.2.0~/backend.py destar-0.2.0/backend.py
+--- destar-0.2.0~/backend.py 2006-11-21 17:44:53.000000000 -0500
++++ destar-0.2.0/backend.py 2006-11-21 18:00:59.000000000 -0500
+@@ -398,6 +398,8 @@
+ for _fn,cnf in configlets.asterisk_configfiles:
+ if _fn == 'op_server.cfg' and panelutils.isConfigured() != 1:
+ continue
++ if not os.access("/etc/zaptel.conf", os.O_RDWR):
++ continue
+ try:
+ cnf.write()
+ except OSError:
+@@ -417,7 +419,10 @@
+
+
+ for short_fn,cnf in configlets.asterisk_configfiles:
+- if fn==short_fn:
++ if fn == 'zaptel.conf':
++ os.rename(cnf.fn, "/etc/asterisk/etc-%s.orig" % cnf.fn)
++ return True
++ elif fn==short_fn:
+ os.rename(cnf.fn, "%s.orig" % cnf.fn)
+ return True
+ return False
+diff -urNad destar-0.2.0~/configlets.py destar-0.2.0/configlets.py
+--- destar-0.2.0~/configlets.py 2006-11-21 17:57:10.000000000 -0500
++++ destar-0.2.0/configlets.py 2006-11-21 18:01:08.000000000 -0500
+@@ -46,7 +46,7 @@
+ if fn == 'destar.conf':
+ fn = os.path.join(CONF_DIR, 'manager.d', fn)
+ if fn == 'zaptel.conf':
+- fn = os.path.join("/etc", fn)
++ fn = os.path.join("/etc", fn)
+ if fn == 'op_server.cfg' or fn == 'op_buttons.cfg':
+ fn = os.path.join(panelutils.PANEL_CONF_DIR, fn)
+ elif fn.find('/')==-1:
+diff -urNad destar-0.2.0~/page_config_trunks.ptl destar-0.2.0/page_config_trunks.ptl
+--- destar-0.2.0~/page_config_trunks.ptl 2006-11-21 17:44:53.000000000 -0500
++++ destar-0.2.0/page_config_trunks.ptl 2006-11-21 17:57:12.000000000 -0500
+@@ -44,5 +44,7 @@
+ phones = True
+ if not phones:
+ _('You should add at least one phone to configure trunks')
++ if not os.access("/etc/zaptel.conf", os.O_RDWR):
++ _("You should enable write access to /etc/zaptel.conf. Without write access to this file you cannot configure Zaptel devices, e.g. FXO/FXS cards, T1/E1 cards, ZapHFC ISDN cards, etc. You should 'chmod g+rw' this file and set it's group to one of '%s'." % 'asterisk')
+ presentConfiglets('Trunks')
+ footer()
Property changes on: destar/trunk/debian/patches/zaptel.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: destar/trunk/debian/postinst
===================================================================
--- destar/trunk/debian/postinst 2006-11-21 23:10:05 UTC (rev 2722)
+++ destar/trunk/debian/postinst 2006-11-21 23:11:27 UTC (rev 2723)
@@ -24,8 +24,6 @@
chown -R asterisk:asterisk /var/run/destar/
chown -R asterisk:asterisk /var/log/destar/
chown asterisk:asterisk /etc/asterisk/destar_cfg.py
- touch /etc/zaptel.conf
- chown asterisk:asterisk /etc/zaptel.conf
mkdir -p /etc/op-panel/destar/
chown -R asterisk:asterisk /etc/op-panel/destar/
More information about the Pkg-voip-commits
mailing list