Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pcmcia schemes not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cbueche
n00b
n00b


Joined: 29 May 2002
Posts: 42
Location: Prêles, Switzerland

PostPosted: Mon Jun 03, 2002 7:33 pm    Post subject: pcmcia schemes not working Reply with quote

Hi all,

I run gentoo on a Dell laptop. As my pcmcia card is better supported by the standalone pcmcia package, I'm using it (hence not the kernel version).

This was working fine with Mandrake 8.2, before changing to gentoo.

With gentoo, when I do a "cardctl scheme name1", it says "changing scheme from name2 to name1", but nothing happen, my /etc/pcmcia/network.opts isn't used, eth0 is not getting reconfigured, neither is resolv.conf, nada.

At boot, I get the config from /etc/conf.d/net, which is static.

What am I doing wrong ???

Please help, I'm swapping networks 2-3 times a day.

Charles
_________________
Charles Bueche <charles@bueche.ch>
sand, snow, wave, wind and net -surfer
Back to top
View user's profile Send private message
chadh
Moderator
Moderator


Joined: 21 Apr 2002
Posts: 137
Location: Atlanta, GA

PostPosted: Tue Jun 04, 2002 2:35 am    Post subject: Reply with quote

Do you use dhcp on both interfaces? if so, then just configure /etc/conf.d/net appropriately, and the scheme switching should work fine. If you have more complicated network configurations for each scheme, then you will have to restore the old /etc/pcmcia/network script. I have committed a copy to /usr/portage/sys-apps/pcmcia-cs/files/network.orig that should work for you. Then your network.opts file will work as expected.

Gentoo doesn't fully support schemes yet, but that is coming. The plan is to more generally support profiles that let you have different /etc/hosts, /etc/resolv.conf, etc. files for each profile.
_________________
Chad
Back to top
View user's profile Send private message
cbueche
n00b
n00b


Joined: 29 May 2002
Posts: 42
Location: Prêles, Switzerland

PostPosted: Tue Jun 04, 2002 2:41 pm    Post subject: Reply with quote

Hi again,

I don't use dhcp, only static settings.

I tried with the network.orig script and my network.opts, but it doesn't work better. "cardctl scheme xxx" says it changes the scheme, but the ip reconfig doesn't happen at all.

A strace shows the following things :

Code:
big files # strace cardctl scheme home
execve("/sbin/cardctl", ["cardctl", "scheme", "home"], [/* 27 vars */]) = 0
brk(0)                                  = 0x8050160
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=55955, ...}) = 0
old_mmap(NULL, 55955, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\250\224"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1285220, ...}) = 0
old_mmap(NULL, 1242944, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40025000
mprotect(0x4014a000, 42816, PROT_NONE)  = 0
old_mmap(0x4014a000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x124000) = 0x4014a000
old_mmap(0x40151000, 14144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x
40151000
close(3)                                = 0
munmap(0x40017000, 55955)               = 0
getuid32()                              = 0
access("/var/lib/pcmcia", R_OK)         = -1 ENOENT (No such file or directory)
geteuid32()                             = 0
brk(0)                                  = 0x8050160
brk(0x80502e0)                          = 0x80502e0
brk(0x8051000)                          = 0x8051000
open("/proc/devices", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(3, "Character devices:\n  1 mem\n  2 p"..., 4096) = 229
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
getuid32()                              = 0
setuid32(0)                             = 0
open("/var/run/pcmcia-scheme", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=5, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(3, "post\n", 4096)                 = 5
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
getuid32()                              = 0
chdir("/etc/pcmcia")                    = 0
open("/var/run/stab", O_RDONLY)         = -1 ENOENT (No such file or directory)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
write(1, "Changing scheme from \'post\' to \'"..., 41Changing scheme from 'post' to 'home'...
) = 41
umask(022)                              = 022
open("/var/run/pcmcia-scheme", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
write(3, "home\n", 5)                   = 5
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
munmap(0x40017000, 4096)                = 0
_exit(0)   

Hints welcomed.

Chadh : we can as well continue this discussion off-list if you prefer. I can as well test your stuff. charles<at>bueche.ch

Something I remember : I don't have "pnp" in my USE. Is this mandatory ?

Charles
_________________
Charles Bueche <charles@bueche.ch>
sand, snow, wave, wind and net -surfer
Back to top
View user's profile Send private message
silverter
Guru
Guru


Joined: 10 Apr 2002
Posts: 491
Location: Ulm, DE

PostPosted: Wed Jul 03, 2002 5:18 pm    Post subject: Reply with quote

Hi!

Did u solve your problem with the pcmcia scheme and switching networks? If so please let me know about your solution, I'm in the same situation here.

Thanks,

regards
--
Silverter - A Profi was once a beginner
Back to top
View user's profile Send private message
cbueche
n00b
n00b


Joined: 29 May 2002
Posts: 42
Location: Prêles, Switzerland

PostPosted: Wed Jul 03, 2002 6:00 pm    Post subject: Reply with quote

Hi,

no, not yet solved. pcmcia-cs 3.1.34 will soon be out and possibly solve this. I'm not sure about it...

Charles
_________________
Charles Bueche <charles@bueche.ch>
sand, snow, wave, wind and net -surfer
Back to top
View user's profile Send private message
chadh
Moderator
Moderator


Joined: 21 Apr 2002
Posts: 137
Location: Atlanta, GA

PostPosted: Wed Jul 03, 2002 6:10 pm    Post subject: Reply with quote

Well, there is a new version of pcmcia-cs (3.1.34), which you may want to try. It is still masked, but feel free to try it
Code:
ebuild /usr/portage/sys-apps/pcmcia-cs/pcmcia-cs-3.1.34-r4.ebuild merge

Please e-mail chadh@gentoo.org with any problems.
_________________
Chad
Back to top
View user's profile Send private message
disciphile
n00b
n00b


Joined: 01 Jul 2002
Posts: 3

PostPosted: Mon Jul 08, 2002 5:07 pm    Post subject: Reply with quote

Sorry for such a simple question, but what does it mean for a package to be "Masked"
_________________
Faith is the daring of the soul to go farther than it can see.
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Tue Jul 09, 2002 12:07 pm    Post subject: masked files.. Reply with quote

disciphile wrote:
Sorry for such a simple question, but what does it mean for a package to be "Masked"

The file were things are masked is /usr/portage/profiles/package.mask. You'll find it pretty simple to understand. The "=" in front of some file names means that it only matches that version of the ebuild. A ">=" means it matches anything that version or higher of an ebuild. This would be a good way to make sure that you use a particular old ebuild. If there is no "=" then all things matching that ebuild are "masked" and they won't be used. There are comments (started with #) that explain why something is masked.
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
disciphile
n00b
n00b


Joined: 01 Jul 2002
Posts: 3

PostPosted: Wed Jul 10, 2002 5:19 pm    Post subject: Reply with quote

Thanks for the explanation Tristam29.
_________________
Faith is the daring of the soul to go farther than it can see.
Back to top
View user's profile Send private message
Cardoe
Retired Dev
Retired Dev


Joined: 28 Jun 2002
Posts: 32

PostPosted: Sun Jul 14, 2002 4:59 am    Post subject: Reply with quote

Did the new ebuild fix the prob?

-Cardoe
Back to top
View user's profile Send private message
watersb
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 297
Location: take a left turn in Tesuque

PostPosted: Thu Apr 10, 2003 7:46 pm    Post subject: Reply with quote

Quote:
Did the new ebuild fix the prob?


Schemes still do not work. I cannot use them.

I tried to manually hard-code the $SCHEME variable in the /etc/init.d/pcmcia script, but that does not work, either.

So for now I hard-code all values for pcmcia setup.
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Thu Apr 10, 2003 9:56 pm    Post subject: Reply with quote

Schemes work fine for me. Due to the age of this thread I am using a much later version of pcmcia-cs ,3.2.4, but mine has been set this way for a long time.

I always change the scheme before inserting the card, which might have something to do with it. Also, I have the config options set in network.opts and wireless.opts.
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Mon Jun 23, 2003 4:06 am    Post subject: Reply with quote

ronmon wrote:
Schemes work fine for me. Due to the age of this thread I am using a much later version of pcmcia-cs ,3.2.4, but mine has been set this way for a long time.

I always change the scheme before inserting the card, which might have something to do with it. Also, I have the config options set in network.opts and wireless.opts.


That is surprising. I am using pcmcia-cs 3.2.4 and it seems network.opts is still ignored. In the unmodified pcmcia-cs network.opts is sourced in /etc/pcmcia/network. Gentoo has a completely different script that doesn't touch network.opts at all. Instead, it uses the same config files as non-pcmcia network cards, /etc/init.d/net.$DEVICE.

This has the unfortunate effect of breaking schemes. I wanted to use schemes but only modify configuration files so that my changes wouldn't be lost the next update. First, I added this line to /etc/pcmcia/network:

export ADDRESS

right under the line that sets it.

Then I modified /etc/conf.d/net. It now has access to $ADDRESS. So, following /etc/pcmcia/network.opts, I wrapped my scheme configs in a

case "$ADDRESS" in
foo,*,*,*)
;;
*,*,*,*)
;;
esac

This way the Gentoo network config is still done in /etc/conf.d.

Even if my suggestion is not used, I recommend changing /etc/pcmcia/network.opts to have a big note at the beginning:

*** THIS FILE IS NOT USED ***
Configuration is done in /etc/conf.d/net{.$DEVICE}
Back to top
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Mon Jun 23, 2003 4:17 am    Post subject: Reply with quote

I should add: I've added this suggestion to the relevant bug:

https://bugs.gentoo.org/show_bug.cgi?id=1990
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum