function provision_fqdn

7.x-3.x provision.inc provision_fqdn($host = NULL)

return the FQDN of the machine or provided host

this replicates hostname -f, which is not portable

Related topics

4 calls to provision_fqdn()
drush_provision_hostmaster_install in ./install.hostmaster.inc
Drush command to install hostmaster.
drush_provision_hostmaster_install_validate in ./install.hostmaster.inc
provision_drush_command in ./provision.drush.inc
Implementation of hook_drush_command().
provision_is_local_host in ./provision.inc
Make a determination whether or not the given host is local or not.

File

./provision.inc, line 139
The provisioning framework API.

Code

function provision_fqdn($host = NULL) {
  if (is_null($host)) {
    $host = php_uname('n');
  }
  return strtolower(gethostbyaddr(gethostbyname($host)));
}