From: Michael Hanselmann Date: Thu, 17 Mar 2016 13:42:39 +0000 (+0100) Subject: FS-8948 #resolve Handle non-existent config in Debian postinst X-Git-Tag: v1.6.7^2~89^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b4b839ed47fd089db82e2b1c709f894d622823d;p=thirdparty%2Ffreeswitch.git FS-8948 #resolve Handle non-existent config in Debian postinst When the "freeswitch" package was installed directly on Debian, i.e. without one of the meta packages pulling in the vanilla configuration (freeswitch-conf-vanilla), the "postinst" script failed: $ apt-get install freeswitch … Setting up freeswitch (1.6.6~13~d2d0b32-1~jessie+1) ... cp: cannot stat ‘/usr/share/freeswitch/conf/vanilla/*’: No such file or directory … With this change the code tests for "freeswitch.xml" before attempting to copy the configuration files. --- diff --git a/debian/freeswitch.postinst b/debian/freeswitch.postinst index c08fd07e31..1498361edd 100644 --- a/debian/freeswitch.postinst +++ b/debian/freeswitch.postinst @@ -31,7 +31,9 @@ case "$1" in done if [ ! -d "/etc/freeswitch" ]; then mkdir -p /etc/freeswitch/ - cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/ + if [ -e /usr/share/freeswitch/conf/vanilla/freeswitch.xml ]; then + cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/ + fi fi if [ ! -d "/etc/freeswitch/tls" ]; then mkdir -p /etc/freeswitch/tls/