tags 360233 + patch
thanks

The directories /var/log/asterisk, /var/run/asterisk and
/var/spool/asterisk are not created by asterisk-config so postinst
should check if they exists, before trying to chmod them or don't care
about them at all (and leave the chmod to the packages who create them).

I've attached a patch which checks for the existence of the directories
not created by asterisk-config fist and only chmod them if they exists.
diff -Nur asterisk-1.2.4.dfsg.orig/debian/asterisk-config.postinst 
asterisk-1.2.4.dfsg/debian/asterisk-config.postinst
--- asterisk-1.2.4.dfsg.orig/debian/asterisk-config.postinst    2006-04-21 
02:09:58.000000000 +0200
+++ asterisk-1.2.4.dfsg/debian/asterisk-config.postinst 2006-04-21 
02:09:33.000000000 +0200
@@ -29,8 +29,10 @@
 
        test -d /var/lib/asterisk || mkdir -p /var/lib/asterisk
        test -d /etc/asterisk || mkdir -p /etc/asterisk
-       chown -R asterisk.asterisk /var/log/asterisk /var/run/asterisk \
-               /var/spool/asterisk /var/lib/asterisk /etc/asterisk 
+       chown -R asterisk.asterisk /var/lib/asterisk /etc/asterisk 
+       test -d /var/log/asterisk && chown -R asterisk.asterisk 
/var/log/asterisk
+       test -d /var/run/asterisk && chown -R asterisk.asterisk 
/var/run/asterisk
+       test -d /var/spool/asterisk && chown -R asterisk.asterisk 
/var/spool/asterisk
        chmod 0660 /etc/asterisk/*.conf
 
        # doing web-vmail foo...

Attachment: signature.asc
Description: Digital signature

Reply via email to