diff options
-rwxr-xr-x | ldap/cm/newinst/setup | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ldap/cm/newinst/setup b/ldap/cm/newinst/setup index 7162b919..13e6724b 100755 --- a/ldap/cm/newinst/setup +++ b/ldap/cm/newinst/setup @@ -116,6 +116,13 @@ if ! [ $silent ]; then # put some common answers in the file hostname=`hostname` + tryhost=`host $hostname | grep -v "not found" | awk '{print $1}'` + if [ "$tryhost" ] ; then + hostname=$tryhost + fi + if ! [ $hostname ] ; then + hostname=localhost.localdomain + fi echo "" | tee -a $logfile echo -n "Hostname to use (default: $hostname) " | tee -a $logfile read ans |