Bug 94673 - net/asterisk startup script fails to start
Summary: net/asterisk startup script fails to start
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Maxim Sobolev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-19 04:20 UTC by Sean Winn
Modified: 2006-04-13 05:01 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Winn 2006-03-19 04:20:07 UTC
	/usr/local/etc/rc.d/asterisk as installed is not sufficient to start
	asterisk on boot. There's at least a couple of problems:

#!/bin/sh

# PROVIDE asterisk
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON

The PROVIDE line should be PROVIDE: otherwise the rc.subr greps won't find
the script (previously it was asterisk.sh, so the legacy startup would still
find it)

The REQUIRE: NETWORKING SERVERS puts it too early in the boot sequence...

Mar 19 15:01:38 pbx kernel: Starting asterisk.
Mar 19 15:01:39 pbx kernel: ELF ldconfig path: /lib /usr/lib /usr/lib/compat
/usr/X11R6/lib /usr/local/lib /usr/local/lib/compat/pkg
/usr/local/libdata/ldconfig
/mysql

It's configured before the ldconfig runs, so any package dependencies (eg.
libpri) can't be dynamically linked.

Fix: 

PROVIDE -> PROVIDE:

Fix the dependency order in the REQUIRE:/BEFORE: lines; I changed it to
REQUIRE: DAEMON and no BEFORE: locally, but there's probably a better way.
How-To-Repeat: 	Install net/asterisk and reboot with asterisk_enable="YES" in
/etc/rc.conf
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-03-19 04:24:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sobomax

Over to maintainer
Comment 2 Maxim Sobolev freebsd_committer freebsd_triage 2006-04-13 05:01:05 UTC
State Changed
From-To: open->closed

Changes committed, thanks!