FS#24772 - dhcpcd needs hostname
Attached to Project:
Arch Linux
Opened by Simon Schneider (schneida) - Saturday, 18 June 2011, 17:52 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 13:23 GMT
Opened by Simon Schneider (schneida) - Saturday, 18 June 2011, 17:52 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 21 August 2011, 13:23 GMT
|
Details
Description:
After removing net-tools from the base group, trying to setup network via dhcpcd without installing anything except base group, results in two error-messages: /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname: line 9: hostname: command not found /usr/lib/dhcpcd/dhcpcd-hooks/30-hostname: line 24: hostname: command not found Even though the network will still work, there shouldn't come up any errors when doing such an essential thing without installing anything else. I've had a look at the file in question and it seems (there are not many helpful comments) that the file is to fetch a hostname from DHCP-Server if needed. Maybe it could be removed or dhcpcd must depend on a package that provides hostname. Additional info: dhcpcd: 5.2.12-1 Steps to reproduce: ip link set eth0 up dhcpcd eth0 |
This task depends upon
The thing is that we cannot really remove "hostname" from net-tools as it has lots of features that some people rely on.
I guess we could create a really basic "hostname" package which only does enough to support the LSB spec. (from some maintained source). Then, "net-tools" colud provide "hostname" and conflict with the hostname package.
For what it is worth, this is my /bin/hostname:
#!/bin/sh
cat /proc/sys/kernel/hostname
So, probably X and dhcpcd could easily read the hostname from the kernel directly (either from /proc or using gethostname()).
if [ -f /proc/sys/kernel/hostname ]; then
echo "$1" > /proc/sys/kernel/hostname
else
hostname "$1"
fi
Up to someone to take the initiative to do this and follow through with it though, I've got enough on my plate.
Right now the PKGBUILD of coreutils explicitly disables it.
My suggestion (though I don't have the time to push it), is:
Create a new packages "coreutils-hostname" (by splitting coreutils). Add "provide=hostname" to both this new package and net-tools. Then make all the packages that need hostname depend on "hostname". Then the local admin can install what they want.
this is also a problem with xorg-xinit
If that i the case I suggest removing some of these things from net-tools and enabling them in inetutils instead.