You are not logged in.
Pages: 1
Hi,
I think it makes more sense to initiate the network interfaces in INTERFACES before attempting to initiate the profiles in NET_PROFILES. Especially considering that it is expected for lo0 to be in INTERFACES.
In my case I have a few profiles for different places and have the network daemon backgrounded, because some of these profiles are taking time to time out and move onto the next one it takes a while before a loopback interface is created. In the meantime other daemons that rely on the loopback interface (cups, fam) are failing to start. If I manage to log into xfce before a network device is initialized then half of xfce fails to work.
Perhaps it would make even more sense to have a separate script for network profiles and interfaces placed in INTERFACES. That way we can have the loopback created in-line with other daemons and background the script to find a profile that works. We can then guarantee a loopback device is ready before starting daemons that rely on it.
I know this problem disappears if I don't background the network daemon, but time is wasted waiting for the network to initialise.
I can upload my hacked /etc/rc.d/network if needed/wanted, but it may have introduced problems I have not thought about and not yet encountered. I'll have a look into creating a separate script for net profiles this weekend - it should only involve shuffling code around.
Course, this is only really relevant to laptop users.
Offline
Doesn't seem to be much interest in this, oh well.
Here is a patch that will implement my alterations for anyone who'd like to follow up on it
--- /etc/rc.d/network.orig 2007-05-02 14:31:09.000000000 +0100
+++ /etc/rc.d/network 2007-05-02 14:31:17.000000000 +0100
@@ -163,27 +163,6 @@
echo "Network is already running. Try 'network restart'"
exit
fi
-
- # See if we're using network profiles
- if [ "$NET" ]; then
- # This env var is passed from the kernel boot line
- if [ "$NET" = "menu" ]; then
- /usr/bin/netcfg --menu --timeout 5
- else
- /usr/bin/netcfg $NET
- fi
- elif [ "$NET_PROFILES" ]; then
- if [ "$NET_PROFILES" = "menu" ]; then
- /usr/bin/netcfg --menu --timeout 5
- else
- for prof in ${NET_PROFILES[@]}; do
- if [ "$prof" = "${prof#!}" ]; then
- /usr/bin/netcfg -c $prof
- fi
- done
- fi
- fi
-
stat_busy "Starting Network"
error=0
# bring up bridge interfaces
@@ -208,6 +187,27 @@
else
stat_fail
fi
+
+ # See if we're using network profiles
+ if [ "$NET" ]; then
+ # This env var is passed from the kernel boot line
+ if [ "$NET" = "menu" ]; then
+ /usr/bin/netcfg --menu --timeout 5
+ else
+ /usr/bin/netcfg $NET
+ fi
+ elif [ "$NET_PROFILES" ]; then
+ if [ "$NET_PROFILES" = "menu" ]; then
+ /usr/bin/netcfg --menu --timeout 5
+ else
+ for prof in ${NET_PROFILES[@]}; do
+ if [ "$prof" = "${prof#!}" ]; then
+ /usr/bin/netcfg -c $prof
+ fi
+ done
+ fi
+ fi
+
;;
stop)
#if ck_daemon network; thenOffline
That's actually almost exactly what I did to my rc.d/network, for exactly the same reason - I want the lo interface to start asap, while the wireless might take its time, or even not connect.
Offline
I'm currently developing new network scripts, and in them, rc.d/network has been seperated from profiles entirely, with rc.d/net-profiles
http://wiki.archlinux.org/index.php/Network_Scripts
James
Offline
I'm currently developing new network scripts, and in them, rc.d/network has been seperated from profiles entirely, with rc.d/net-profiles
Good news. This will answer this http://bbs.archlinux.org/viewtopic.php?id=28947 as well
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
I'm currently developing new network scripts, and in them, rc.d/network has been seperated from profiles entirely, with rc.d/net-profiles
http://wiki.archlinux.org/index.php/Network_Scripts
James
Seems I should have searched the site more thoroughly then
.
I look forward to seeing them complete, or if time permits testing them even
Offline
Pages: 1