You are not logged in.
Hi,
i made a patch for the /etc/rc.d/network startscript some time ago and havent published it yet. So here it is:
The idea is to start different network profiles (/etc/network-profiles/) after each other, until one profile was successfully applied. E.g. I have a laptop with eth0 (wired) and eth1 (wireless), so when booting with plugged in cable I want my eth0 to be active. When the cable is not plugged in, I want eth1 to be enabled.
The patch can be downloaded from: http://piie.net/files/chained_network.patch
to apply it: login as root,
cd /etc/rc.d/
patch -p0 < /where/you/saved/chained_network.patch
now you can edit the NET_PROFILES=(XXXXXX) line /etc/rc.conf
-> Profiles in the line prefixed by a colon are such chained profiles:
e.g. NET_PROFILES=(:eth0 :wpa)
hf!
Last edited by piie (2007-09-09 18:25:31)
Offline
Great work. I started with network profiles because I wanted a faster boot (laptop as well) when I had no cable attached. I guess that your script still needs time for linux to sence that there is no cable attached?
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
that may depend on your network card. For me, using an intel 82801db network card, detecting whether the cable is plugged in or not works instantly. No noticable delay.
EDIT: aah, ensure that the package "net-tools" is installed, it contains mii-tool which is used for detecting if the cable is plugged in.
Last edited by piie (2007-09-10 09:06:50)
Offline
when i first read this i didnt think id like it, but nevertheless i patched it and tried it out. it works damn well and i think ill be keeping it. great job piie, thanks.
Last edited by rson451 (2007-09-10 15:28:08)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
rson451, thanks, but:
p i i e <-- two "i" in the middle
Offline
aw hell, it was early ... i even went to your site this morning and STILL got it wrong in the post lol
Last edited by rson451 (2007-09-10 15:27:45)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
There's already development on a new network profile system, and the current one will soon be deprecated.
Please look at netcfg2. http://bbs.archlinux.org/viewtopic.php?id=36384
James
Offline
thanks for this information. Anyway, this simple hack can be used until netcfg2 is finally released.
Last edited by piie (2007-09-11 07:36:30)
Offline
thanks for this information. Anyway, this simple hack can be used until netcfg2 is finally released.
This isnt in netcfg2, so I guess you might want to try and add it in -- best way would be to add it as a different connection type, rather than editing the existing connections.
Offline
oh, there isn't included something like that in the new netcfg. I'm going to create a patch for it as soon as I have some time.
- you don't have to edit the network profiles, just prefix them with a colon in the network_profiles array in /etc/rc.conf
Offline