[Pkg-voip-commits] r5517 - in /freepbx/trunk/debian: TODO.Debian asterisk-config-freepbx.postinst changelog
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Tue Apr 8 13:26:55 UTC 2008
Author: tzafrir-guest
Date: Tue Apr 8 13:26:55 2008
New Revision: 5517
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5517
Log:
Fix /etc/asterisk permissions in asterisk-config-freepbx postinst.
Modified:
freepbx/trunk/debian/TODO.Debian
freepbx/trunk/debian/asterisk-config-freepbx.postinst
freepbx/trunk/debian/changelog
Modified: freepbx/trunk/debian/TODO.Debian
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/TODO.Debian?rev=5517&op=diff
==============================================================================
--- freepbx/trunk/debian/TODO.Debian (original)
+++ freepbx/trunk/debian/TODO.Debian Tue Apr 8 13:26:55 2008
@@ -3,3 +3,4 @@
* freepbx-database currently needs to provide amportal.conf, maybe give the packages a way to modify
the installed amportal.conf?
* rename /etc/amportal.conf to /etc/freepbx.conf
+ * Get rid of chmod -R g+w /etc/asterisk in the postinst script.
Modified: freepbx/trunk/debian/asterisk-config-freepbx.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/asterisk-config-freepbx.postinst?rev=5517&op=diff
==============================================================================
--- freepbx/trunk/debian/asterisk-config-freepbx.postinst (original)
+++ freepbx/trunk/debian/asterisk-config-freepbx.postinst Tue Apr 8 13:26:55 2008
@@ -19,11 +19,23 @@
case "$1" in
configure)
- # this will take care of adding the users, and
- # chmod'ing as needed
- if [ -x /usr/share/asterisk/bin/asterisk_fix ]; then
- /usr/share/asterisk/bin/asterisk_fix
- fi
+ # 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
+ done
+
+ # handle them in the end with a glob since it's way faster
+ dpkg-statoverride --quiet --list '/etc/asterisk/*' | while read STAT; do
+ chown `echo $STAT | cut -d' ' -f 1,2,4 | sed 's/ /:/'` \
+ 2>/dev/null
+ done
+
+ # Last and ugliest: just make it all
+ # grou-asterisk-writable:
+ chmod -R g+w /etc/asterisk
;;
abort-upgrade|abort-remove|abort-deconfigure)
Modified: freepbx/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/trunk/debian/changelog?rev=5517&op=diff
==============================================================================
--- freepbx/trunk/debian/changelog (original)
+++ freepbx/trunk/debian/changelog Tue Apr 8 13:26:55 2008
@@ -11,6 +11,7 @@
* no_cp_symlink_subdirs: Some copying that should be done at install /
postinst .
* resolve_conf-report_errors-db: Yet another data-base-dependent part.
+ * Fix /etc/asterisk permissions in asterisk-config-freepbx postinst.
-- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Sun, 06 Apr 2008 21:14:35 +0300
More information about the Pkg-voip-commits
mailing list