Bug#533079: asterisk: start-stop-daemon should have --make-pid

Darshaka Pathirana dpat at syn-net.org
Mon Jun 15 08:07:23 UTC 2009


Hi Fadion!

On 14.06.2009 17:39, Faidon Liambotis wrote:
> Darshaka Pathirana wrote:

> #!/bin/sh
> set -e
>
> .. /usr/share/debconf/confmodule

Copy&paste mistake. The confmodule line should read like this:

. /usr/share/debconf/confmodule

>> --- /etc/init.d/asterisk.orig   2009-06-14 17:01:23.000000000 +0200
>> +++ /etc/init.d/asterisk        2009-06-14 16:31:44.000000000 +0200
>> @@ -170,7 +170,7 @@
>>                         echo "$DESC is already running. Use restart."
>>                         exit 0
>>                 fi
>> -               start-stop-daemon --start --group $GROUP --pidfile "$PIDFILE" \
>> +               start-stop-daemon --start --group $GROUP --make-pidfile --pidfile "$PIDFILE" \
>>                         $CHDIR_PARM \
>>                         --exec $REALDAEMON -- $PARAMS
>>
>> After adding the option my postinst-script run fine.
>
> That's incorrect. --make-pidfile is for programs that don't create their
> own pidfile. This is usually the wrong way to do things because of
> processes forking into the background and changing pids.

Ok. It was just a guess after comparing the way how asterisk is
started with RUNASTSAFE=yes.

> Asterisk creates its own pidfile, and there's no reason that we should
> switch from it to start-stop-daemon.

Ok.

>> Please note that running "/etc/init.d/asterisk restart" on the command line
>> caused no problems. So there must be something wrong in combination with debconf.
>> (But I have no idea what why.)
>
> Right, we'd have a much bigger issue if "restart" didn't work :-)
> I'm not sure what's the problem with your setup.
> 
> I'll try to have a look with your example postinst at some point.

Thx. That would be fine.

Greetings,
 - Darsha





More information about the Pkg-voip-maintainers mailing list