Making plugin - Function to check if hostname exists
-
Hi there… I’m making a plugin for FOG… I know there is a function called hostsExists to check if a mac address exists in the hosts table… however, is there any function to check if the hostname exists?
Regards,
Alipio Luiz -
Code for 0.33 BETA
[code]// Within a FOG Class
$hostExists = $this->getClass(‘HostManager’)->exists(array(‘name’ => ‘chicken’)));// Outside of a FOG Class
$hostExists = $GLOBALS[‘FOGCore’]->getClass(‘HostManager’)->exists(array(‘name’ => ‘chicken’)));[/code]