FS#9960 - after upgrade , /etc/rc.d/network restart not work
Attached to Project:
Arch Linux
Opened by lh (jarryson) - Wednesday, 26 March 2008, 02:25 GMT
Last edited by Greg (dolby) - Saturday, 17 May 2008, 14:37 GMT
Opened by lh (jarryson) - Wednesday, 26 March 2008, 02:25 GMT
Last edited by Greg (dolby) - Saturday, 17 May 2008, 14:37 GMT
|
Details
Description:
initscripts 2008.03-4 my net is static IP ethernet, i can not use /etc/rc.d/network restart to restart my network. but when my system first start , the network is fine , and initscripts 2007.10 has no such problem here is my rc.conf [code] eth0="eth0 125.*.*.* netmask 255.255.255.0 broadcast 192.168.0.255" INTERFACES=(eth0) gateway="default gw 125.220.17.254" ROUTES=(gateway) [/code] someone told me here is where the problems are: in /etc/rc.d/network : ifup(): [code] # don't bring up an interface that's already up [ "$(/sbin/ifconfig ${1} 2>/dev/null |\ /bin/grep -v 'inet6 addr: fe80:' |\ /bin/grep -e 'inet addr:' -e 'inet6 addr:')" ] && return 0 [/code] when the network is stoped , ifconfig eth0 should have no output , but infact it has . it is weird maybe something wrong with the package with the package ifconfig ,and maybe initscripts |
This task depends upon
Closed by Greg (dolby)
Saturday, 17 May 2008, 14:37 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in initscripts 2008.05-1
Saturday, 17 May 2008, 14:37 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in initscripts 2008.05-1
:: Stopping Network [DONE]
:: Starting Network [BUSY]
SIOCADDRT: No such process
If i try to use a static ip with a gateway i get the error above.
However if i use dhcp without a gateway it works fine.
cant restart network with static ip
eth0="eth0 125.*.*.* netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0)
gateway="default gw 125.220.17.254"
ip and broadcast are different
this is irrelevant of the fact that network daemon will die during restart (I see this too) when configured with static address
have u had any idea about this ?
i should change broadcast to 125.*.*.1 ?
i've tried but still have the error
in your case broadcast 125.*.*.255
eth0="eth0 125.*.*.* netmask 255.255.255.0 broadcast 125.220.17.255"
The broadcast address is used to broadcast packets to every machine on your subnet. so evidently for IP 125.*.*.* address 192.168.0.255 is not your subnet.
this is, well, additional error
"$(/sbin/ifconfig ${1} 2>/dev/null |\
/bin/grep -v 'inet6 addr: fe80:' |\
/bin/grep -e 'inet addr:' -e 'inet6 addr:')" ] && return 0
After commenting out this part /etc/rc.d/network restart|start works again.
So, please check this part for any problems.
Thanks.
/sbin/ifconfig ${1} down >/dev/null 2>&1
This doesn't remove the address of the device while this would work:
/sbin/ifconfig ${1} down >/dev/null 2>&1
/usr/sbin/ip addr flush ${1} >/dev/null 2>&1
Check the output from `ifconfig -a` after /etc/rc.d/network stop.
I know, iproute is not in base group... but i think this would be cleaner.
It worked for me with static ip and dhcp. But i couldn't test bonding and brigding,