Bug#360220: asterisk-config: fails to upgrade when /etc/asterisk/voicemail.conf is deleted

Jasper Spaans jasper at vs19.net
Fri Mar 31 11:55:13 UTC 2006


Package: asterisk-config
Version: 1:1.2.4.dfsg-7
Severity: important
Tags: patch

When trying to upgrade this package on my system I get the following:

$ LANG=C sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up asterisk-config (1.2.4.dfsg-7) ...
chown: cannot access `/etc/asterisk/voicemail.conf': No such file or directory
dpkg: error processing asterisk-config (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 asterisk-config
E: Sub-process /usr/bin/dpkg returned an error code (1)

The following patch fixes that:

--- /var/lib/dpkg/info/asterisk-config.postinst~	2006-03-31 13:52:36.000000000 +0200
+++ /var/lib/dpkg/info/asterisk-config.postinst	2006-03-31 13:52:36.000000000 +0200
@@ -34,8 +34,8 @@
 	chmod 0660 /etc/asterisk/*.conf
 
 	# doing web-vmail foo...
-	chown asterisk:www-data /etc/asterisk/voicemail.conf
-	chmod 0640 /etc/asterisk/voicemail.conf
+	[ -f /etc/asterisk/voicemail.conf ] && chown asterisk:www-data /etc/asterisk/voicemail.conf
+	[ -f /etc/asterisk/voicemail.conf ] && chmod 0640 /etc/asterisk/voicemail.conf
 
     ;;
 

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=nl_NL.UTF-8 at euro, LC_CTYPE=nl_NL.UTF-8 at euro (charmap=UTF-8)

asterisk-config depends on no packages.

Versions of packages asterisk-config recommends:
pn  asterisk                      <none>     (no description available)

-- no debconf information

-- 
Jasper Spaans                                       http://jsp.vs19.net/
 13:53:21 up 10635 days,  4:40, 1 user, load average: 4.10 4.31 4.89

           iPod schuifelgang: Willekeurig is de Nieuwe Orde




More information about the Pkg-voip-maintainers mailing list