You are not logged in.
Looking for testers for netcfg2, which will replace the current netcfg/profile system.
This package installs alongside the existing netcfg, so it will not clobber or overwrite any configuration. I've hunted down all the bugs from netcfg, and the existing scripts, so if i've missed any, please let me know on the bug tracker. Particularly some of those nastier ones like essid's containing spaces, all fixed. I've closed most feature requests too. Those that remain will be done 'soon', 2.1 or earlier. I'd like to get the foundation solid and stable first. Contributions are always welcome though!
Features of note:
http://wiki.archlinux.org/index.php/Net … w_Features
Download:
Package and source:
http://src.iphitus.org/netcfg-release/
Will be in the [testing] repo later today too.
PKGBUILD is inside the above source tarball.
Documentation:
I'm writing it.
Configuration is in /etc/network.d/, there are countless examples in there already.
In rc.conf, it has been renamed from NET_PROFILES to NETWORKS.
The rc.d daemon is now /etc/rc.d/net-profiles
For those who used the ini based network scripts, this one has gone back to sh style configs. It's had a few other changes too. I'm approaching this a bit more conservatively, as the ini setup was just totally over-engineered. This ones something like half the code size at least, works just as well, and far more readable. So if you got scared off by the source last time, give it another look.
If you want roaming support, ala networkmanager, see brain0's autowifi.
Please remember that this is not the final version, and there are bugs. Through testing, i want to get them fixed before the final version.
Last edited by iphitus (2007-08-18 03:30:47)
Offline
... and we're actually a head of schedule! (ie, its not year 3000 yet...)
congratulations for a great work done. i knew you could
i'll take a look, and wait for some more users to check it out, before changing the gui program.
Offline
Tested rapidly, here are some comments :
- netcfg2 should output the help menu when called without arguments.
- The wiki says some man pages are written, but they aren't in the package nor the sources, so where can we find them ?
- You should rename the subroutines in /usr/lib/network because when using a bad connection type, netcfg2 outputs :
example is not a valid connection.
Try one of: ethernet.subr
network.subr
wireless.subr
which in fact won't work because you don't need to type the .subr in "CONNECTION".
also it would look better if it was printed all on the same line, like this :
Try one of : ethernet, choice2, choiceN
The -a option is not working, the problem is in network.subr :
all_down()
{
for prof in $STATE_DIR/profiles/*; do
. $STATE_DIR/profiles/$prof
profile_down $PROFILE
done
}
Here $prof already contains the full path, so $STATE_DIR/profiles is in excess. Also, sourcing the profile doesn't set $PROFILE. I fixed the problem this way :
all_down()
{
for prof in $STATE_DIR/profiles/*; do
profile_down `basename $prof`
done
}
The rest seems ok. I did a little sneak peek to the code and I must say that I like you style
Keep up with the good work
Leif-
Last edited by leif_thande (2007-08-19 02:49:15)
Offline
alright. new version uploaded with the aforementioned changes.
The documentation mentioned on the wiki page is here:
http://archlinux.org/~james/projects/?p … 2a;hb=HEAD
though it's written for an older version of these scripts which experimented with ini styled configs, not the bash configs in this one, so there will need to be some minor changes to correct them
thanks for testing, I really appreciate it. As for style, the style of these came after a lot of changes, edits and lessons learnt from earlier versions. It was also partially inspired by the style used in some of FreeBSD's scripts.
James
Last edited by iphitus (2007-08-19 11:45:24)
Offline
I can't help but get the bloat feeling when I see this
Last edited by RedShift (2007-08-19 16:18:15)
:?
Offline
Isn't it confusing to have two systems :
INTERFACES stuff in rc.conf, and network profiles ?
The only thing I've in INTERFACES for a while is lo. Is there any cases where one wouldn't want to have the loopback interface ?
Maybe it could be built in somewhere.
Otherwise maybe it's already possible to make a profile for it?
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Redshit : Bloat ? Come on, it could hardly be more minimalistic. Arch was missing a good Internet connection manager and netcfg is good tool, well integrated into the Arch setup.
Last edited by leif_thande (2007-08-19 20:25:17)
Offline
Isn't it confusing to have two systems :
INTERFACES stuff in rc.conf, and network profiles ?The only thing I've in INTERFACES for a while is lo. Is there any cases where one wouldn't want to have the loopback interface ?
Maybe it could be built in somewhere.
Otherwise maybe it's already possible to make a profile for it?
Profiles came after INTERFACES, and INTERFACES will definitely not be removed. Many people still find them useful, particularly on desktops with static configurations - myself even. I do intend to increase the code share between these two, as there's a lot of duplication already, but that'll come later.
It is possible to create a profile for lo though:
CONNECTION="ethernet"
INTERFACE="lo"
IP="static"
IFOPTS="127.0.0.1"
Should work.
I can't help but get the bloat feeling when I see this
Take a look at /usr/bin/netcfg. It's very messy. The scripts themselves, are blind, stupid and make plenty of assumptions - mostly incorrect. Take a look at the example profile in /etc/network-profiles, generally confusing. As you can see, the current network profiles do need a lot of work.
This is simply a long needed rewrite, that is a lot tidier, separated from initscripts and has many of the nastier bugs removed. Have a look at the code before you declare 'bloat' - you'll find its anything but. This code has been developed over 18 or so months, evolving through a few forms, resulting in the simplest and tidiest implementation I could design, that you see here now.
These scripts will make it far easier to run on wireless on Arch "out of the box", in a "simple" arch styled way, in addition to meeting some long missing capabilities, closing plenty of bugs and feature requests.
James
Offline
shining wrote:Isn't it confusing to have two systems :
INTERFACES stuff in rc.conf, and network profiles ?The only thing I've in INTERFACES for a while is lo. Is there any cases where one wouldn't want to have the loopback interface ?
Maybe it could be built in somewhere.
Otherwise maybe it's already possible to make a profile for it?Profiles came after INTERFACES, and INTERFACES will definitely not be removed. Many people still find them useful, particularly on desktops with static configurations - myself even. I do intend to increase the code share between these two, as there's a lot of duplication already, but that'll come later.
Ok so maybe that could be possible in the long run?
It is possible to create a profile for lo though:
CONNECTION="ethernet" INTERFACE="lo" IP="static" IFOPTS="127.0.0.1"
Should work.
That seems to work fine for bringing the interface up, but netcfg2 isn't able to bring it down.
"sudo netcfg2 -d loopback" fails, "ifconfig lo" shows it's still up, and the files in /var/run/net/ are still there.
Otherwise, there is a little typo in the init script :
--- /etc/rc.d/net-profiles 2007-08-19 13:39:23.000000000 +0200
+++ /etc/rc.d/net-profiles.new 2007-08-20 12:15:08.000000000 +0200
@@ -37,7 +37,7 @@
;;
stop)
# shutdown any profiles started by netcfg (or from NET_PROFILES in rc.conf)
- status "Stopping Network Profiles" /usr/bin/netcfg2 down-all
+ status "Stopping Network Profiles" /usr/bin/netcfg2 all-down
rm_daemon net-profiles
;;
restart)
And finally, there is a little problem due to the co existence of netcfg and netcfg2 :
"/etc/rc.d/network stop" calls "/usr/bin/netcfg --stopall" , which will look for files in /var/run/net .
But netcfg2 already uses this directory, in a different way:
sudo /etc/rc.d/network stop ~
/usr/bin/netcfg: line 76: .: /var/run/net/interfaces: is a directory
error: missing interface name (eg, eth0)
:: Stopping Network [DONE]
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Ok so maybe that could be possible in the long run?
Yup, hopefully.
That seems to work fine for bringing the interface up, but netcfg2 isn't able to bring it down.
"sudo netcfg2 -d loopback" fails, "ifconfig lo" shows it's still up, and the files in /var/run/net/ are still there.
Ok, tested it, and its working for me. Made some changes, try in 1.99.25.
Otherwise, there is a little typo in the init script :
fixed. Thanks for that.
And finally, there is a little problem due to the co existence of netcfg and netcfg2 :
"/etc/rc.d/network stop" calls "/usr/bin/netcfg --stopall" , which will look for files in /var/run/net .
But netcfg2 already uses this directory, in a different way:sudo /etc/rc.d/network stop ~ /usr/bin/netcfg: line 76: .: /var/run/net/interfaces: is a directory error: missing interface name (eg, eth0) :: Stopping Network [DONE]
hrm. ok. I suppose I could move it, but it's where it should be, anywhere else is a tad counter-intuitive. I'll move it temporarily, though the idea is for it to be a global state directory for all scripts. It's moved to /var/run/network/ in 1.99.26
James
Last edited by iphitus (2007-08-20 11:31:25)
Offline
Ok, tested it, and its working for me. Made some changes, try in 1.99.25.
Cool, it works perfectly now.
I figured something was probably missing in ethernet_down , but wasn't sure exactly
I suppose I can disable the network script now, and only use net-profiles.
fixed. Thanks for that.
no problem.
hrm. ok. I suppose I could move it, but it's where it should be, anywhere else is a tad counter-intuitive. I'll move it temporarily, though the idea is for it to be a global state directory for all scripts. It's moved to /var/run/network/ in 1.99.26
James
It isn't a real problem, since it will disappear when netcfg2 replaces netcfg. I just wanted to mention it
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
It isn't a real problem, since it will disappear when netcfg2 replaces netcfg. I just wanted to mention it
yeah. /var/run/network is fine anyway, it's in 1.99.26.
As a note, for those upgrading to 1.99.26 from a prior version, take all netcfg managed connections down first, upgrade, then raise them again after the upgrade.
I've got my desktop running entirely on netcfg2 now, without any problems, for me all of wireless(wpa), ethernet and loopback are connected, going up and down upon request -- working fine. wep was also working as required earlier.
James
Offline
As a note, for those upgrading to 1.99.26 from a prior version, take all netcfg managed connections down first, upgrade, then raise them again after the upgrade.
I've got my desktop running entirely on netcfg2 now, without any problems, for me all of wireless(wpa), ethernet and loopback are connected, going up and down upon request -- working fine. wep was also working as required earlier.
James
I'm now using 1.99.26 with loopback and wireless (dhcp + wpa), everything works perfectly, thanks.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
iphitus wrote:As a note, for those upgrading to 1.99.26 from a prior version, take all netcfg managed connections down first, upgrade, then raise them again after the upgrade.
I've got my desktop running entirely on netcfg2 now, without any problems, for me all of wireless(wpa), ethernet and loopback are connected, going up and down upon request -- working fine. wep was also working as required earlier.
James
I'm now using 1.99.26 with loopback and wireless (dhcp + wpa), everything works perfectly, thanks.
Great Thanks for your help. Anyone else using wireless care to test? This setup will not interfere with your current one, thus should break nothing.
James
Offline
One wep wireless with static ip + loopback working here (using 1.99.26). No problems to report - boring, I know... Thanks for your work on this!
Last edited by fwojciec (2007-08-23 05:04:56)
Offline
Updated, 1.99.27
Fixed -c, checkyesno, and added an example configs for loopback and net-rename (/etc/iftab)
http://src.iphitus.org/netcfg-release/n … pkg.tar.gz
James
Offline
I tired out the new scripts at home with wpa, wep an no encryption and it all worked fine. I also tested it with the wirless at my university where it also worked without a problem. All with the atheros based card in my laptop.
The only error like thing I sometimes got was that, even though the interface was down, or no longer connected to the access point netcfg2 wouldn't let me reconnect until I first told it to take the interface down and then up again. But I haven't yet figured in which circumstances this happens I'll try some more.
Anyway many thanks for those nice scripts.
Offline
Trying to use netcfg-menu give an error
# netcfg-menu
/usr/bin/netcfg-menu: line 14: /home-wifi: Aucun fichier ou répertoire de ce type
/usr/bin/netcfg-menu: line 14: /home-wired: Aucun fichier ou répertoire de ce type
/usr/bin/netcfg-menu: line 14: /loopback: Aucun fichier ou répertoire de ce type
No profiles were found in
/usr/bin/netcfg-menu: line 25: return: can only `return' from a function or sourced script
...
lots of empty lines
...
netcfg v0.1usage: netcfg [options] <profile_name>
netcfg --stop <interface>
netcfg --menu [--timeout <secs>]
netcfg --stopalloptions:
-c Don't reconfigure an interface if it's already upNetwork profiles are stored in /etc/network-profiles
solved by these little patch
--- netcfg-menu.old 2007-08-27 16:59:22.000000000 +0200
+++ netcfg-menu 2007-08-27 17:02:52.000000000 +0200
@@ -3,6 +3,8 @@
. /etc/rc.conf
. /etc/rc.d/functions+PROFILE_DIR=/etc/network.d
+
# Scan all profiles
i=0
for prof in `find $PROFILE_DIR -maxdepth 1 -type f -printf "%f\n"`; do
@@ -44,10 +46,10 @@
case $ret in
1) ;; # Cancel - do nothing
255) # timeout - use default
- netcfg $DEFAULT
+ netcfg2 $DEFAULT
;;
0) # User selection
- netcfg $(cat $ANSWER)
+ netcfg2 $(tail -n 1 $ANSWER)
;;
*) # Shouldnt happen
echo "Abnormal ret code from dialog: $ret"
Everything else (ethernet and wifi all with dhcp and a hack to have the 2 nic with the ame mac address) works fine.
Offline
How the **ll did i miss this!
Been waiting for ages thanks iphi! will test asap
Offline
After some more test with wifi, when using WPA (with an ipw2200bg), before calling wpa_supplicant,lookslike a call to iwconfig is missing to set the ESSID.
Am I the only one with such a problem ?
Offline
After some more test with wifi, when using WPA (with an ipw2200bg), before calling wpa_supplicant,lookslike a call to iwconfig is missing to set the ESSID.
Am I the only one with such a problem ?
no call is missing. wpa_supplicant sets the essid, there's no need for iwconfig to do anything whatsoever when using wpa_supplicant. wpa works fine for me, you saying it isnt working there or just you think it should do that?
I'll fix up netcfg-menu too.
James
Offline
I say it does not work without this call with my card.
Offline
I say it does not work without this call with my card.
what card? what's your configuration? where are you adding ifconfig into the scripts? does it work when you add it in that exact location?
that's quite an odd problem. It'll be interesting to see what driver it is.
Last edited by iphitus (2007-08-28 07:02:44)
Offline
I'm using Arch32, an Intel Pro Wireless 2200 bg, the stock arch kernel and no change the default wpa_supplicant.conf.
I'm connecting to an AP with an hidden ESSID, using WPA2.
This the "patch":
--- wireless.subr.old 2007-08-26 04:26:12.000000000 +0200
+++ wireless.subr.new 2007-08-28 09:32:35.000000000 +0200
@@ -113,6 +113,11 @@
wpa)
local WPA_CONF=`mktemp /tmp/wpa.XXXXXXXX`+ if ! eval iwconfig $INTERFACE mode managed essid "$ESSID"; then
+ echo "wireless-up: Could not set wireless configuration"
+ return 1
+ fi
+
# Create a random file to store configuration, make it root only.
chmod 600 $WPA_CONF
echo "ctrl_interface=/var/run/wpa_supplicant" >> $WPA_CONF
If I look at the iwconfig output with the original netcfg2 script, I can see when the key is set but no essid set, and I've got the
Wireless association failed.
error. Then if I set the ssid before calling netcfg2, the connection is ok. That's why I added this line to wireless.subr
Last edited by slubman (2007-08-28 07:35:55)
Offline
will this work on arch64 too?
the pkgbuild doesn't have a x86_64 flag...
We can't stop here! This is bat country!!
Offline