Welcome to Centmin Mod Community
Become a Member

Master Branch centos 6 fix for hostname -f detection

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jul 24, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    4:53 AM
    Nginx 1.13.x
    MariaDB 5.5
    centos 6 fix for hostname -f detection

    - on centos 6 the hostname -f detection will give error unknown host on dummy not FQDN based hostnames so need to fallback to hostname command without -f when unknown host errror is detected.

    example if you run local virtualbox centos server and hostname is set to domain.localdomain instead of say host.domain.com, then hostname -f would result in

    Code (Text):
    hostname -f
    hostname: Unknown host
    

    so fall back to hostname command with -f
    Code (Text):
    hostname
    domain.localdomain
    


    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.