Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RESOLVED: hostname: line 24: hostname: command not found
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
IceSunrise
n00b
n00b


Joined: 03 Mar 2008
Posts: 24
Location: Russia, Saint-Petersburg

PostPosted: Thu Sep 29, 2016 8:55 am    Post subject: RESOLVED: hostname: line 24: hostname: command not found Reply with quote

Hi there,

Absolutely unexpectedly my gentoo can not set the hostname on my machine anymore.
The error I get is this one:
Code:
/etc/init.d/hostname: line 24: hostname: command not found

The line 24 in /etc/init.d/hostname is this one:
Code:
hostname "$hostname"


Apparently I'm missing the hostname binary and indeed I can not find it on my system.
Could someone help me by pointing to the package hostname binary is part of and maybe explain where did it go to from my system?


Last edited by IceSunrise on Thu Sep 29, 2016 9:32 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21321
Location: here

PostPosted: Thu Sep 29, 2016 9:12 am    Post subject: Reply with quote

Code:
# equery b /bin/hostname
 * Searching for /bin/hostname ...
sys-apps/net-tools-1.60_p20160215155418 (/bin/hostname)

But I have not idea because is not installed in your system
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
IceSunrise
n00b
n00b


Joined: 03 Mar 2008
Posts: 24
Location: Russia, Saint-Petersburg

PostPosted: Thu Sep 29, 2016 9:30 am    Post subject: Reply with quote

Haha, many thanks fedeliallalinea!
I've just reinstalled sys-apps/net-tools package with USE="hostname" flag and got back /bin/hostname binary.
Have no idea what happened here that I got this problem, maybe there was no that flag before and the binary was compiled by default, very strange...
Anyway, thanks for the help again! ;)
Back to top
View user's profile Send private message
klz
n00b
n00b


Joined: 07 Jun 2011
Posts: 31

PostPosted: Tue Oct 11, 2016 8:01 pm    Post subject: Reply with quote

I had the same problem. Seems that the net-tools package got extra use-flags recently.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum