[Pkg-voip-commits] r4205 - asterisk/trunk/debian

paravoid at alioth.debian.org paravoid at alioth.debian.org
Wed Aug 22 16:31:54 UTC 2007


Author: paravoid
Date: 2007-08-22 16:31:54 +0000 (Wed, 22 Aug 2007)
New Revision: 4205

Modified:
   asterisk/trunk/debian/asterisk-config.postinst
   asterisk/trunk/debian/asterisk.postinst
Log:
Handle dpkg-statoverride efficiently for /etc/asterisk/*. Tzafrir probably won't like this :-)

Modified: asterisk/trunk/debian/asterisk-config.postinst
===================================================================
--- asterisk/trunk/debian/asterisk-config.postinst	2007-08-22 16:02:53 UTC (rev 4204)
+++ asterisk/trunk/debian/asterisk-config.postinst	2007-08-22 16:31:54 UTC (rev 4205)
@@ -23,6 +23,12 @@
 		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
+
 	set -e
     ;;
 

Modified: asterisk/trunk/debian/asterisk.postinst
===================================================================
--- asterisk/trunk/debian/asterisk.postinst	2007-08-22 16:02:53 UTC (rev 4204)
+++ asterisk/trunk/debian/asterisk.postinst	2007-08-22 16:31:54 UTC (rev 4205)
@@ -36,7 +36,6 @@
 	     /var/lib/asterisk \
 	     /var/run/asterisk \
 	     -type d | while read dir; do
-		# honor dpkg-statoverride
 		if ! dpkg-statoverride --list "$dir" > /dev/null ; then
 			chown asterisk: $dir
 		fi
@@ -76,6 +75,12 @@
 		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
+
 	set -e
     ;;
 




More information about the Pkg-voip-commits mailing list