Asterisk bug

The start/stop script for asterisk (downloaded from here) has a bug in it.

In the start() section it checks to see if asterisk is running by executing the following command:

/usr/sbin/asterisk -rx 'core show version'

and extracts the first 8 characters from the output and compares it to the word “Asterisk”. The problem is that asterisk colorizes its display so the first couple of characters are unseen control codes and this check will therefore fail when asterisk is already running. This can be fixed by changing the command to:

/usr/sbin/asterisk -nrx 'core show version'

(note the addition of the ‘n’ flag).

A second problem is that the script does not have a “status” section even though it is advertised in the usage output.

As I see it, you analysed this correctly as a bug. Please file it at: openSUSE:Submitting bug reports - openSUSE.