new port config in /etc?

Brad Waite freebsd at wcubed.net
Sat May 1 17:46:13 UTC 2010


I'm attempting to port FreePBX (asterisk GUI) which is built for CentOS.  The config file is hard coded in a number to
be "/etc/amportal.conf".  I changed all occurrences to "${LOCALBASE}/etc/amportal.conf" and made patch files for the port.

That worked for the original build, but FreePBX has a built-in upgrade feature which can replace any of those patches
files with upgraded versions.  Of course, the new files are using the old "/etc/amportal.conf".

What's the best way to handle this?  Should I have the port create a symlink from /etc/amportal.conf to
/usr/local/etc/amportal.conf?  That seems to be the simplest solution, but also vaguely feels like The Wrong Thing(tm).

Trying to patch the newly upgraded files would be a nightmare.  I could try to do a search/replace on the known
directories, but there's no way to be sure there aren't new dirs created and used in the upgrade.  Obviously a recursive
search from / is impractical.  And what would trigger this replacement anyway?  I could build it in to the initial
version via patch file, but that file could be updated in the upgrade.

In a similar situation, there's a handful of files that have a /bin/bash or /bin/perl shebang that were upgraded as well.

I was initially surprised there wasn't an existing port for FreePBX, but I'm not so surprised anymore.  This is my first
porting attempt, and it's nearly enough to make me want to ditch FreeBSD for my asterisk and install the all-in-one
CentOS/Asterisk/FreePBX.  That said, I'm extremely loyal to FBSD and loathe the thought of that.

Thanks in advance for any help, guys!

Brad Waite


More information about the freebsd-ports mailing list