LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   /bin/hostname is missing in recent upgrade (https://www.linuxquestions.org/questions/slackware-arm-108/bin-hostname-is-missing-in-recent-upgrade-4175620688/)

asarangan 01-01-2018 10:52 PM

/bin/hostname is missing in recent upgrade
 
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

TheEzekielProject 01-01-2018 11:11 PM

Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:

apt-get install hostname
for instance. Obviously, use the package manager for your system

Penthux 01-02-2018 02:02 AM

Quote:

Originally Posted by asarangan (Post 5800402)
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

Try this to see if it gives any output about your hostname:

Code:

root@vuur:~# uname -n
vuur

root@vuur:~# hostname
vuur

You could run 'netconfig' to use the Slackware setup wizard to try and resolve the issue:

Code:

root@vuur:~# netconfig
There's always the manual method:

Code:

root@vuur:~# hostname vesp
root@vuur:~# nano -w /etc/HOSTNAME

vesp.yourdomain.lan

root@vuur:~# nano -w /etc/hosts

# For loopbacking.
127.0.0.1              localhost
127.0.0.1              vesp.yourdomain.lan vesp

# End of hosts.

root@vuur:~# reboot

It should now be fixed. Try 'uname -n' command after rebooting.

Quote:

Originally Posted by TheEzekielProject (Post 5800403)
Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:

apt-get install hostname
for instance. Obviously, use the package manager for your system

Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'. :D

TheEzekielProject 01-02-2018 02:08 AM

Quote:

Originally Posted by Penthux (Post 5800426)



Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'. :D


If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:

apt-cache search hostname
hostname - utility to set/show the host name or domain name


Penthux 01-02-2018 02:30 AM

Quote:

Originally Posted by TheEzekielProject (Post 5800429)
If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:

apt-cache search hostname
hostname - utility to set/show the host name or domain name


Code:

root@vuur:~# slackpkg search hostname

Looking for hostname in package list. Please wait... DONE

No package name matches the pattern.

My issue is that this is Slackware. Not Debian/Ubuntu? Your advice may be good for the latter, but on Slackware there is no advanced package tool (apt) command/function.

Code:

root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

root@vuur:~# apt-cache search hostname
-bash: apt-cache: command not found

Why would you even want it on Slackware? Apt goes against the Slackware Way and takes control away from the Admin (i.e. me and you) with regards to package management.

Slackware uses 'pkgtool' (installpkg, removepkg, etc.) or 'slackpkg'. There is no 'apt-get' or 'apt-whatever' on my Slackware ARM system.

TheEzekielProject 01-02-2018 02:44 AM

Which is why I said in that very same post
Quote:

Originally Posted by TheEzekielProject (Post 5800403)
Obviously, use the package manager for your system

Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz

rworkman 01-02-2018 03:02 AM

I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.

drmozes 01-02-2018 03:03 AM

Quote:

Originally Posted by asarangan (Post 5800402)
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.

The package was split out -- the information is in the Change Log - search for "hostname".

Penthux 01-02-2018 03:20 AM

Quote:

Originally Posted by TheEzekielProject (Post 5800445)
Which is why I said in that very same post

Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz

Well, we deal with Slackware ARM in this forum. So, unless the OP has posted in the wrong section then he'll need the ARM version of the package you're referring to: ftp://ftp.arm.slackware.com/slackwar...3.18-arm-1.txz.

Furthermore, as you correctly stated, this package only exists in Slackware ARM -current. So, if the OP is running Slackware ARM 14.2 (as I did previously) he will not be able to install, or find, this package for his system. Slackware ARM 14.2 is the soft float port and -current is the hard float port.

Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end. :hattip:

TheEzekielProject 01-02-2018 03:43 AM

Quote:

Originally Posted by Penthux (Post 5800456)
Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end. :hattip:

Yes, I missed that this was the Slackware ARM forum, I was just searching in the 'View New Posts' section, and saw no mention of the distro in the OP or OP's bio. Which is why I made sure to clarify that the OP should use his distro's package manager. Sorry for confusing you.

I thought I had relayed the information well enough to the OP that he could figure it out.

Regardless, the fact stands that in current, hostname is a package.

It may not be in 14.2, but OP has not stated what he is running. Or I missed it

asarangan 01-02-2018 08:59 AM

Quote:

Originally Posted by rworkman (Post 5800451)
I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.

This is exactly what happened. Thank you for your reply. I didn't realize I had to run install-new, but that brings me to the question how to use it correctly. My system is minimal, and does not include the 'kde', 'xap' and a few other series. When I run install-new, it brings up every package in all the series, and I am not sure how to sort through that huge list to find out which packages to select. In this particular case it is obvious, because I know I am missing "hostname". But if I didn't know that, is there a way to bring up only the new packages that were not in the original installation of my system?

Penthux 01-02-2018 09:37 AM

Quote:

Originally Posted by asarangan (Post 5800563)
is there a way to bring up only the new packages that were not in the original installation of my system?

Code:

root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:

root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know. ;)

BW-userx 01-02-2018 10:28 AM

Code:

Fri Dec 29 08:08:08 UTC 2017
a/kernel-modules-armv7-4.14.9_armv7-arm-1.txz: Upgraded.

#located in dir 'a'

a/hostname-3.18-arm-1.txz: Added.
      This is the latest version of the hostname utility, broken out into a new
      package to get rid of duplication between util-linux and net-tools.

http://www.slackware.com/changelog/current.php?cpu=arm

change log

abga 01-02-2018 12:09 PM

@asarangan

https://www.linuxquestions.org/quest...nt-4175618768/

(it's still on the first page of the Slackware ARM Forum)

asarangan 01-02-2018 12:23 PM

Quote:

Originally Posted by Penthux (Post 5800575)
Code:

root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:

root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know. ;)

Great, thank you. There is no way I would have figured out from the man page that "slackpkg install slackware" would bring up only the uninstalled packages. But when I do that, I get several hundred items to scroll through (because mine is a minimal system), and all of them are selected by default with the "*". I don't mean to sound lazy, but how do I deselect them all without having to deselect them one by one?


All times are GMT -5. The time now is 04:24 PM.