diff options
author | unknown <lenz@mysql.com> | 2003-08-06 12:13:08 +0200 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2003-08-06 12:13:08 +0200 |
commit | f21221b0bb57472f42404a70f46de1b6e636415f (patch) | |
tree | 467fa2281e98f76daa0c1d41f9ec9838e386c339 /scripts | |
parent | 0940443b3979e68fe1a66bdd039af841db961a63 (diff) | |
download | mariadb-git-f21221b0bb57472f42404a70f46de1b6e636415f.tar.gz |
- 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)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_install_db.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 64fdd0dfebb..ffb857933cd 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -107,7 +107,13 @@ then 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 if test "$IN_RPM" -eq 0 -a $force -eq 0 |