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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Roman Kyrylych (Romashka)
Architecture All
Severity High
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 15
Private No



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
eth0="eth0 125.*.*.* netmask broadcast"
gateway="default gw"

someone told me here is where the problems are: in /etc/rc.d/network : ifup():
# 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

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
Comment by lh (jarryson) - Wednesday, 26 March 2008, 02:31 GMT
i forget to post the error information

:: Stopping Network [DONE]
:: Starting Network [BUSY]
SIOCADDRT: No such process
Comment by Filip Wojciechowski (fwojciec) - Wednesday, 26 March 2008, 03:09 GMT
I have the same problem -- basically, starting network during boot works fine but trying to restart network daemon (/etc/rc.d/network restart) results in an error like in the previous post. My workaround is to stop the network daemon, unload/reload the network card module and the start the network daemon again.
Comment by kane (kane) - Wednesday, 26 March 2008, 10:27 GMT
I also have this problem.
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.
Comment by Borromini (Borromini) - Wednesday, 26 March 2008, 12:41 GMT
Same problem here, only on my Slicehost VPS, and rebooting that didn't help either :-(. In the end I rebuilt the damn thing.
Comment by Marco Rocco (ech0s7) - Wednesday, 26 March 2008, 12:53 GMT
i have the same problem...
Comment by Giorgos (ranger) - Wednesday, 26 March 2008, 21:53 GMT
same here.
cant restart network with static ip
Comment by Michal (broch) - Thursday, 27 March 2008, 13:00 GMT
there is an error in your config,
eth0="eth0 125.*.*.* netmask broadcast"
gateway="default gw"

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
Comment by lh (jarryson) - Thursday, 27 March 2008, 15:46 GMT
re : michal

have u had any idea about this ?

i should change broadcast to 125.*.*.1 ?

i've tried but still have the error
Comment by Michal (broch) - Friday, 28 March 2008, 00:59 GMT
As I mentioned this is not related to the problem with network dying upon restart. I have exactly the same issue with static IP and restarting network (dead)

in your case broadcast 125.*.*.255
eth0="eth0 125.*.*.* netmask broadcast"

The broadcast address is used to broadcast packets to every machine on your subnet. so evidently for IP 125.*.*.* address is not your subnet.

this is, well, additional error
Comment by Mark (marky) - Sunday, 30 March 2008, 12:19 GMT
I've got same problem. Network will start after typing ifconfig eth0 up, but it will work very slow - with maximum downrate 4-7kb/s
Comment by grocal (grocal) - Monday, 31 March 2008, 12:08 GMT
There's a problem with a part of ifup() where system checks for any active network interfaces.

"$(/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.
Comment by Mark (marky) - Wednesday, 02 April 2008, 05:23 GMT
Thanks for help grocal, network restart works without problems now.
Comment by Alberto Gonzalez (Luis) - Friday, 04 April 2008, 02:24 GMT
I also had the problem: Network fine upon boot, but dying if I restart it. Commenting out those lines quoted in /etc/rc.d/network makes it work again.

Comment by Ray Rashif (schivmeister) - Monday, 07 April 2008, 18:26 GMT
For me, something funny happens. I get thrown off to vc1 =/ It only fails to stop, but it starts (somehow).
Comment by Aaron Griffin (phrakture) - Wednesday, 09 April 2008, 19:34 GMT
I think Thomas fixed this in git, so a new initscripts release should solve it. Is that correct?
Comment by Thomas Bächler (brain0) - Thursday, 10 April 2008, 07:58 GMT
I sure hope so.
Comment by Sascha Klockow (dreamZ) - Friday, 11 April 2008, 22:10 GMT
I think the real problem is in ifdown():
/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.
Comment by Aaron Griffin (phrakture) - Friday, 11 April 2008, 22:16 GMT
It's already fixed in git
Comment by Thomas Bächler (brain0) - Friday, 11 April 2008, 22:43 GMT
dreamZ is right - sort of: we should move to iproute as it is much more powerful and ifconfig/route have been deprecated for years. But if we do, we should switch completely, not partially.
Comment by Sascha Klockow (dreamZ) - Saturday, 12 April 2008, 00:30 GMT
Here's is a diff for initscripts for switch from ifconfig/route to iproute.
It worked for me with static ip and dhcp. But i couldn't test bonding and brigding,
Comment by Aaron Griffin (phrakture) - Saturday, 12 April 2008, 05:07 GMT
dreamZ, can you please add this to the related bug I opened regarding iproute, so we can stick to "one bug, one report". This bug is not about iproute, and should be closed. The related one, however, is.
Comment by Gavin Bisesi (Daenyth) - Tuesday, 06 May 2008, 17:09 GMT
I want to also note that the new initscripts can no longer handle connecting to a wireless network with a space in the essid.