Commit f21221b0 authored by unknown's avatar unknown

- try harder to obtain the FQDN with "hostname -f", if possible (BUG#897)

   Unfortunately the returned value of "hostname" is inconsistent on
   various platforms - some return the host name only, others return the
   FQDN by default. On Linux, one can use option "-f" to enable the output
   of the FQDN. Use it, if available.


scripts/mysql_install_db.sh:
   - try harder to obtain the FQDN with "hostname -f", if possible (BUG#897)
parent 0940443b
...@@ -107,7 +107,13 @@ then ...@@ -107,7 +107,13 @@ then
fi fi
fi fi
hostname=`@HOSTNAME@` # Install this too in the user table # Try to determine the fully qualified domain name (FQDN)
HOSTNAME="@HOSTNAME@"
if $HOSTNAME -f > /dev/null 2>&1 ; then
hostname=`$HOSTNAME -f`
else
hostname=`$HOSTNAME`
fi
# Check if hostname is valid # Check if hostname is valid
if test "$IN_RPM" -eq 0 -a $force -eq 0 if test "$IN_RPM" -eq 0 -a $force -eq 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment