Bug 518890 - setup-ds-admin.pl - improve hostname validation
https://bugzilla.redhat.com/show_bug.cgi?id=518890
Resolves: bug 518890
Bug Description: setup-ds-admin.pl - No fully qualified domain name in brackets + Error: failed to open an LDAP connection to host 'host.domain' port '389' as user 'cn=Directory Manager'. Error: unknown.
Reviewed by: nhosoi, nkinder (Thanks!)
Branch: 389-ds-base-1.2.8
Fix Description: Create a new function called checkHostname. This function
will perform various checks on the given hostname:
* see if it looks like an fqdn
* see if it resolves
* see if its IP addresses resolve back to the given hostname
In interactive mode, if there are problems with the hostname, the user will
be warned, and prompted to proceed anyway with the problematic hostname.
The prompt default is No, so the user will have to type Yes to proceed with
the problematic hostname.
In silent mode, the warning messages will be printed and logged.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: Yes - will need to update the install guide
(cherry picked from commit 2af43a860bdec34e4b8368470ad9822fa8d1253b)