On Mon, Dec 20, 2010 at 12:26:59PM +0900, d+...@vdr.jp wrote:
On Fri, Dec 17, 2010 at 04:35:33PM +0100, Julien Cristau wrote:
> @@ -45,6 +45,9 @@
>  # Tightened permissions for the config file
>  chmod -R ug=rw,o=,ug+X /etc/icecast2/icecast.xml
>
> +# avoid to fail on invoke-rc.d icecast2 start when upgrading see Bug#605507
> +sleep 3
> +

What is this supposed to achieve?

When upgrading icecast2, stop (in prerm) and start (in postinst) process.
In some case, icecast2 gets signal and stops after a while.
If icecast2 process still exists, start fails.
So it waits for process really stopping.
Old icecast2's init does not have "--retry TERM/5/0/30" option,
so I put "sleep 3" in postinst for upgrading icecast2.


Ahh, thanks for clarifying - I was wondering too.

In that case it is probably better to do something like this in preinst or postinst (doublecheck that it works - below is only pseudocode!):

if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" le 2.3.2-6; then
  pkill icecast2
fi


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

Reply via email to