A bit more info then: On the Gentoo forum I found the command
- Code: Select all
IN_BACKGROUND=true /etc/init.d/net.eth0 --debug --verbose start
and this gives me an error, which is almost certainly the cause of the problem.
I won't print the whole trace, it's huge, but the error is
- Code: Select all
+ eval 'config=$config_0'
++ config='192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0'
+ '[' -z '192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0' ']'
+ set -- 192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0
+ ebegin 192.168.1.3
* 192.168.1.3...
+ eindent
+ EINFO_INDENT=4
+ '[' 4 -gt 40 ']'
+ export EINFO_INDENT
+ case "$1" in
+ _add_address 192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0
+ '[' 192.168.1.3 = 127.0.0.1/8 -a eth0 = lo ']'
+ '[' broadcast = netmask ']'
+ '[' eth0 = lo ']'
+ case "$1" in
+ case "$@" in
+ ip addr add 192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0 dev eth0
Error: either "local" is duplicate, or "netmask" is a garbage.
.
.
* ERROR: net.eth0 failed to start
So I checked the man page for ip and it doesn't appear to support 'netmask' like that, if I run it from the command line I get the same error. I looked in net.eth0 and its called in a function '_add_address', but I have no idea what language it's written in and I can't work out which file provides that function.
I changed /etc/conf.d/net so that instead of reading
- Code: Select all
# Sabayon Linux static network configuration tool
config_eth0="192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0"
routes_eth0="default via 192.168.1.1"
dns_servers_eth0="208.67.222.222"
as it was created by net-setup, it now looks like
- Code: Select all
# Sabayon Linux static network configuration tool
config_eth0="192.168.1.3/24 broadcast 192.168.1.255"
routes_eth0="default via 192.168.1.1"
dns_servers_eth0="208.67.222.222"
and now it will start successfully with
- Code: Select all
IN_BACKGROUND=true /etc/init.d/net.eth0 start
I don't know whether this is a bug in net-setup or net.eth0, but I suspect the former.
I haven't tried a reboot yet, but I don't see why it wouldn't work, so I'm happy
