[Pkg-voip-commits] r5634 - in /freepbx/trunk/debian: asterisk-config-freepbx.postinst changelog rules

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Mon Apr 28 20:26:29 UTC 2008


Author: tzafrir-guest
Date: Mon Apr 28 20:26:29 2008
New Revision: 5634

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5634
Log:
Postinst of asterisk-config-freepbx makes sure we only #include
existing files (possibly creates empty files as needed) because of 
Asterisk's strange requirement.

Modified:
    freepbx/trunk/debian/asterisk-config-freepbx.postinst
    freepbx/trunk/debian/changelog
    freepbx/trunk/debian/rules

Modified: freepbx/trunk/debian/asterisk-config-freepbx.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/asterisk-config-freepbx.postinst?rev=5634&op=diff
==============================================================================
--- freepbx/trunk/debian/asterisk-config-freepbx.postinst (original)
+++ freepbx/trunk/debian/asterisk-config-freepbx.postinst Mon Apr 28 20:26:29 2008
@@ -21,10 +21,15 @@
 	configure)
 		# find conffiles under /etc/asterisk belonging to asterisk-config
 		# and chown them to user asterisk.
-		dpkg-query -W -f='${Conffiles}\n' asterisk-config 2>/dev/null | \
-		  sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p' | \
-		while read conffile; do
-			chown asterisk: ${conffile} 2>/dev/null
+		conf_files=`dpkg-query -W -f='${Conffiles}\n' asterisk-config-freepbx 2>/dev/null | \
+		  sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p'`
+		chown asterisk: $conf_files 2>/dev/null
+		inc_files=`grep -h '^#include' $conf_files | grep -v '\*' \
+			| tr -d '"' | cut -d' ' -f2 | sort -u`
+		for inc in $inc_files; do
+			if [ ! -f "/etc/asterisk/$inc" ]; then
+				touch "/etc/asterisk/$inc"
+			fi
 		done
 	
 		# handle them in the end with a glob since it's way faster

Modified: freepbx/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/changelog?rev=5634&op=diff
==============================================================================
--- freepbx/trunk/debian/changelog (original)
+++ freepbx/trunk/debian/changelog Mon Apr 28 20:26:29 2008
@@ -12,6 +12,9 @@
     postinst .
   * resolve_conf-report_errors-db: Yet another data-base-dependent part.
   * Fix /etc/asterisk permissions in asterisk-config-freepbx postinst. 
+  * Postinst of asterisk-config-freepbx makes sure we only #include
+    existing files (possibly creates empty files as needed) because of 
+    Asterisk's strange requirement.
 
  -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Sun, 06 Apr 2008 21:14:35 +0300
 

Modified: freepbx/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/rules?rev=5634&op=diff
==============================================================================
--- freepbx/trunk/debian/rules (original)
+++ freepbx/trunk/debian/rules Mon Apr 28 20:26:29 2008
@@ -93,6 +93,9 @@
 	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/*.md5
 	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/md5-amp_conf.sh
 
+#	We don't have on-line updates:
+	rmdir debian/freepbx-common/usr/share/freepbx/modules/_cache/
+
 # 	lame...
 	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/2.3.0beta1/core_migrate.php
 	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/2.3.0rc1/removefiles.php




More information about the Pkg-voip-commits mailing list