In FreePBX 2.2.1, safe_opserver begins with the following two lines:
#!/usr/bin/env sh
source /etc/amportal.conf
This is incorrect, because the "source" keyword is a bash construct, not a sh one. On many operating systems sh is not merely an alias to bash. For example, on FreeBSD, bash is not installed by default and sh is a real Bourne-compatible shell. On Ubuntu, sh is a symlink to dash, another lightweight shell compatible with the Bourne shell, but without a lot of the bash enhancements.
On these systems, this makes the install_amp script fail. It also makes "amportal start" fail to start the flash operator panel server. (Generating an error to the console every 4 seconds, even. There should definitely be at least basic error condition checks in this script, but that's a separate bug.)
Line 2 should instead read:
. /etc/amportal.conf
Reading the bash manpage, 'source' and '.' appear to be completely equivalent. Except of course that '.' is valid in all Bourne variants.