hostname set to "-s" after easyapache/upcp updates??

fsrjs4

Registered
PartnerNOC
Apr 3, 2004
2
0
151
Hey all,

Quick question that I hope someone has an answer to .

Over the weekend I ran easyapache and upcp , and afterwards my server hostname was set to "-s"


An ideas?

Thanks in advance.
 

flipper

Member
Sep 14, 2002
20
0
151
Do a hostname -s and see if it resets the hostname to -s or if it gives you the shortname as it should. If it changes the hostname to -s, try /bin/hostname -s. If that gives you the short hostname, then there is a version of hostname on the server that is getting priority over the one in /bin, and it isn't accepting switches.
 

DomineauX

Well-Known Member
PartnerNOC
Apr 12, 2003
429
11
168
Houston, TX
cPanel Access Level
Root Administrator
Found this to be a prob on a customers server as well.
The version of hostname in /usr/local/bin does not accept the -s switch for short output.

just do:

cd /usr/local/bin
mv hostname bak.hostname
ln -s /bin/hostname hostname

to resolve this odd issue. Although would be nice if this turns out to be a common prob if cpanel can make sure it is resolved permanently.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
DomineauX said:
Found this to be a prob on a customers server as well.
The version of hostname in /usr/local/bin does not accept the -s switch for short output.

just do:

cd /usr/local/bin
mv hostname bak.hostname
ln -s /bin/hostname hostname

to resolve this odd issue. Although would be nice if this turns out to be a common prob if cpanel can make sure it is resolved permanently.

We don't use hostname -s in later releases.