LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   This has got to be a bug!! (https://www.linuxquestions.org/questions/slackware-14/this-has-got-to-be-a-bug-714581/)

argon99 03-26-2009 08:30 AM

This has got to be a bug!!
 
So I have been working on getting my wireless card up. Please see "Why isn't this working":http://www.linuxquestions.org/questi...orking-714422/

All it took to get it to work was changing IFNAME in rc.inet1.conf from ath0 to wlan0. ath0 is a perfectly good name for an interface and is used by madwifi drivers for a long time.

I suspect that this bug is what is causing the problems people are having with 12.2. If I'm wrong I have included all of my config files in the thread "why isn't this working" please show me where I have made an error.

So how does one file a bug report for slackware? I used to live just a couple of houses down from Pat. We weren't really friends, he did invite me out for a beer but I don't drink and we just never found the time to get together. So in the past if I had run into something like this I would have just walked down the street but what does a person do to file a bug report in slackware.

XavierP 03-26-2009 08:48 AM

I would suggest dropping an email to either Alien Bob or Rworkman via the LQ mail on their profiles. Eric and Robby are very involved in Slackware and may be able to either get a fix upstream or explain why it isn't a bug.

Hangdog42 03-26-2009 11:08 AM

This is most decidedly NOT a bug. Ethernet devices can have a variety of names, wireless ones doubly so and the IFNAME variable needed to have a default value. For that, wlan0 is a good case, but as is the case with a lot of things in Slackware, you need to tailor it to your situation. Believe me, if the default script used ath0 instead of wlan0, there would be a lot more incidents like yours.

alan_ri 03-26-2009 12:07 PM

It's not a bug.
ath5k driver will name device wlan0 and ath_pci will name it ath0.That's all there is to it.

argon99 03-28-2009 10:13 AM

I don't belive it is correct in saying it is not a bug. If I am supposed to be able to give the interface any name I want, which is why there is a way to do this in inet1, then only having the default able to work is a bug. I should be able to set IFNAME to George_the_First and have it run merrily along. But somewhere the script is breaking with an IFNAME other then wlan0. This is a bug folks.

I just told my wife that I was having a discussion about whether something was a bug or not. She asked "How many legs does it have."

Hangdog42 03-28-2009 01:26 PM

Well, since you're adamant this is a bug, I've asked for this thread to be moved to the Slackware forum. It will likely get attention from some of the Slackware team.

alan_ri 03-28-2009 03:16 PM

Again,it's not a bug.
You can give any name you like to any interface that you have,but it won't work (like it didn't work before in your system) if the name isn't what it should be,because it's a driver who gives the name to it,not you and things will work if IFNAME and name set by the driver for the interface match.You can only set your own preferences.
Modifing the driver's source code (if/when possible) or making your own driver could change that.

PTrenholme 03-28-2009 05:47 PM

Although I believe that you can alias your "special" name in one of the modprobe configuration files. (Note that I've never done this, so I don't know any details.)

argon99 03-29-2009 02:04 PM

Quote:

Originally Posted by alan_ri (Post 3490896)
Again,it's not a bug.
You can give any name you like to any interface that you have,but it won't work (like it didn't work before in your system) if the name isn't what it should be,because it's a driver who gives the name to it,not you and things will work if IFNAME and name set by the driver for the interface match.You can only set your own preferences.
Modifing the driver's source code (if/when possible) or making your own driver could change that.

Actually I wondered where the name of the interface is assigned. The first place I looked at was the code of the driver. I grepped for both wlan0, ath0 also wlan and ath. Nowhere are these strings present. It's not in the driver that these names are applied. I suspect the names are assigned by udev but at this time I can't confirm or deny this. But on the opensuse box I am currently using I just took a look at /etc/udev/rules.d and found that, on opensuse at least, this is the place that the names are assigned to the interfaces. I suspect it's the same on slackware but I won't know for sure until I check. So your assertion that the names are assigned in the driver code is incorrect.

I do want to address this part of your statement: "Modifing the driver's source code (if/when possible)" I wrote my first program in 1972. I have had my own software company producing IVR systems. That's interactive voice responce. When the internet took off I retired and went into investing. I was tired of the long hours that are required to produce good code. I much prefer playing with my kids to staring at a screen. So it's been possible to modify the driver for many decades and currently I am looking around for an open source project that doesn't have too many primadonas or arrogant Aholes that I would like to contribute to. These requirments make the list very small.

argon99 03-29-2009 02:11 PM

Quote:

Originally Posted by XavierP (Post 3488414)
I would suggest dropping an email to either Alien Bob or Rworkman via the LQ mail on their profiles. Eric and Robby are very involved in Slackware and may be able to either get a fix upstream or explain why it isn't a bug.

I will do this after I have gone over the scripts more and have something more to add then this "doesn't work." At the very least I want to be able to point out where the problem is and maybe have some sort of solution.

I came here to see if I had just forgotten something important or if there was a problem and a fix was floating around. But it seems neither are the case. If everybody just uses the default then the software is never truely checked for all conditions. And if the concept of "just get it to work" is applied the software is never truely checked. In my opinion the concept of open source is to get the best code possible from the most input. If nobody stresses the code there is no improvement in the code.

alan_ri 03-29-2009 03:13 PM

argon99,

This will probably come as a surprise to you,but I will say if and when I was wrong and I was wrong.
I was searching and found that actually one can change network interface name the way one want it to be.
Quote:

The ifrename utility, by the esteemed Jean Tourrilhes of the Wireless Tools for Linux project, assigns permanent, arbitrary names to all types of network interfaces: ISA, PCI, USB, CardBus, and PCMCIA. This means you can easily give your devices sensible names like "lan", "wan", and "dmz", or use their driver names.
ifrename is part of the wireless-tools package.
Quote:

ifrename on Debian
ifrename is available as a separate package for Debian. It installs ready to go to work, with a boot script and configuration file already in place. The configuration file is /etc/iftab. A simple configuration looks like this:
# This file assigns persistent names to network interfaces. See iftab(5).
alan_ri mac 00:0b:6a:ef:7e:8d
linuxxx mac 00:04:5a:55:5c:9d
Then you must use these names in /etc/network/interfaces, and in every script that uses interface names.
I just changed the names in the quote.
Quote:

Boot Script
Debian comes with an init script for ifrename, which can be used on any system. If you want to use ifrename on a different system, you must have a boot script. Other systems don't always include an init script for ifrename. Here is the entire script. Naturally you may tweak it to suit, and mind your filepaths:
And the script is:
Code:

#!/bin/sh 
 NAME=ifrename
IFRENAME=/sbin/ifrename
IFTAB=/etc/iftab 
 test -f $DAEMON || exit 0
test -f $IFTAB || exit 0 
 case "$1" in
    start|reload|force-reload|restart)
            $IFRENAME -d -p
        ;;
        stop)
        ;;
        *)
                echo "Usage: invoke-rc.d $NAME {start|stop|reload|force-reload|restart}"
        ;;
esac 
 exit 0

Quote:

Take a look at the $IFRENAME -d -p line. The -d flag is Debian-specific; it loads only the drivers for interfaces named in /etc/network/interfaces. -p tells ifrename to probe for the interface modules, and load any that are not already loaded. This is a nice feature that doesn't hurt anything if it's not needed, and it makes sure that the correct drivers get loaded.
The Debian init script also includes the -t flag, which I have deleted. This allows interface name-swapping. For example, when one interface is down, a second interface can take its name. There may be times when you want this to happen; me, I want them to stay put.
You were right about udev,I suggest reading this for anyone interested.
I said what I believed it's true,but I didn't think it through good enough.Above examples shows that I was wrong but only in a way.Some of my statments said before still stand.
P.S.
You said;
Quote:

I am looking around for an open source project that doesn't have too many primadonas or arrogant Aholes that I would like to contribute to. These requirments make the list very small.
Well,it's your opinion,but somehow I believe that it's so far from the truth.

argon99 03-30-2009 04:19 AM

Alan_ri
Thank you for your reply and assistants in setting the ifname problem. But your solution looks to be debian specific. Not that that is a problem but I was working on Slackware and there are some differences. But I'm sure that there are areas of overlap.

As for the other part of my post about the open source projects. Are you familar with the cdrecord situation? The problem got so out of hand that the project has been forked into wodim. Also Debian seems to have a great deal of infighting going on. Didn't the top guy, I don't remember the title assigned to this position at debian is, just get replaced? The prima donna problem is huge. The reason is so few people admit when they are wrong. I commend you on that.

One thing I would like to add about the ifrename tool. Because ifname is set in udev I'm pretty sure that the ifrename tool uses the udev tool set. That for, some reason that escapes, me Pat did not include with Slackware 12.2. This, from the outside, looks like it might be a problem. I suspect that the udev tool set will have to be added to Slackware before any real progress can be made.

argon99 03-30-2009 06:27 AM

Well it's 5 am and I have just gotten a chance to get on the slackware box.

Ifrename is included with Slackware 12.2 so it's not debian specific. I did take a look at the source for ifrename it doesn't seem to call the udev tool set so that won't be a problem. I also rechecked rc.inet1 and I don't believe that you can exclude rc.wireless or rc.wireless.config. I say this because rc.inet1 calls rc.wireless with every network interface regardless if its a wired or wireless interface. Inside rc.wireless it checks if the interface that it was called with is a wireless interface. I didn't check but I suspect that here is the problem of why you can't change the IFNAME in rc.inet1.conf and have it work. If you just pick a name for the interface it's not registered with the kernel as an interface of any sort let alone wireless. So when rc.wireless checks if the interface it is being called with is wireless it thinks it is not because it doesn't have a listing in iwconfig. And this is why setting to the default works, because the default is in iwconfig.

In my opinion there needs to be some code added before the call to rc.wireless that checks if the name set for IFNAME is registered with the kernel and is reported by iwconfig. If it is do nothing and pass the call along to rc.wireless ( the same code that is in rc.wireless can be reused ). If it is not then call ifrename and set the name of the wireless interface to the IFNAME in rc.inet1.conf. Then call rc.wireless with the new interface name. This should work and correct the problem of IFNAME in rc.inet1.conf being useless. But like I said it's 5 am and I haven't been to sleep yet and I just quickly checked out the code for ifrename and rc.inet1 and rc.wireless so there probably is a better way.

Sometime in the next couple of days I will see if I can work up a fix and then I will submit a patch.

alan_ri 03-30-2009 01:36 PM

I'm not familiar with cdrecord situation.Also,I'm not familiar with things goin' on inside Debian at the moment,because I haven't been involved in any way lately,but I can say that things were not beautiful lately for some projects,maybe PCLinuxOS example is a good example of how things should not be.

I haven't use Slackware for a long time and I do not intend to do so,so maybe I will not be able to help you with some specifics,but I will watch this thread and I will see if I can help you.

argon99 03-31-2009 07:25 PM

Quote:

Originally Posted by alan_ri (Post 3492779)
I'm not familiar with cdrecord situation.Also,I'm not familiar with things goin' on inside Debian at the moment,because I haven't been involved in any way lately,but I can say that things were not beautiful lately for some projects,maybe PCLinuxOS example is a good example of how things should not be.

I haven't use Slackware for a long time and I do not intend to do so,so maybe I will not be able to help you with some specifics,but I will watch this thread and I will see if I can help you.

Acually you already have helped. Comming up with ifrename is the key element in fixing this situation. I am working on the change to rc.inet1 and expect it to be done very soon. It's not that big of a problem so it will be over soon. The main problem is making sure the solution is scalable. I know most users only have one wireless interface but I can see many reasons to have more. So I am writing the code so that the user can have as many wireless interfaces as they can stuff in their box. And with USB that can be a lot.

I have used slackware going all the way back to the early ninties when you had a handfull of floppies. But every so often I have checked out other distros to see what they are doing. I ran kubuntu for awhile. But kde 4.OH_NO came out and they lost me. What an abortion. Even Linus has stopped using kde because of the disaster they created with 4.OH_NO.

I resently started using opensuse. I got it from a magazine and put it on an extra drive I had just to check it out. It had lots of eye candy and the package management system is very nice. but after using it for awhile I have found a number of things that are just unexceptable. So I have a couple high output wireless cards and was going to make my own 600mW AP. I thought Slackware would be the way to go. It realy is fairly rock solid. I probably found the only problem spot. And I suspect that that problem came up with the change to udev.

As for what I will throw some code at enlightenment 17 looks nice. It has a great beginning and there are places that could use some work, like their file manager.

I'm not the best shell scripter, C and x86 assembler is more my line, so there will probably be better ways to script the solution but it will work and look like it was written by a C programmer. I will post the solution when I am done with it.


All times are GMT -5. The time now is 04:15 PM.