[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pcmcia schemes ...



hate to follow myself up here only a few minutes later, but in case anyone
is interested, i just made it work.

> does anyone have a sample config for setting up scheme support for
> pcmcia so i can have a 'work' and a 'home' setup without having to run
> my own script (what i do now).

it's easy, i've attached my /etc/pcmcia/network.opts file.  it should be
fairly obvious from that what i did.  you can swap between them like this:

heyzeus(root)# cardctl scheme work
heyzeus(root)# cardctl scheme home

> if there is good docs anywhere that i've missed a pointer would be great
> too.

the howto has a pretty good docs on how to do this.  it's a little
misleading at first, but everything you need is there.

one problem i do still have, well more of an oddity then a problem, is it's
hard to change schemes (or remove the pcmcia modules) if you have anything
using the network.  while i understand that the module is being used, it
seems a little riduluous that there isn't a "do it anyway, i really mean it"
setting.

the only way around this i've found is to ifconfig the interface down before
doing any changes but this seems a little clunky.  does anyone have a better
solution?

eg.

heyzeus(root)# cardctl scheme work
checking: eth0
Device 'eth0' busy: scheme unchanged.

heyzeus(root)# ifconfig eth0 down

heyzeus(root)# cardctl scheme work
checking: eth0 ttyS3
Changing scheme from 'home' to 'work'...

adam.

# Network adapter configuration
#
# The address format is "scheme,socket,instance,hwaddr".
#
# Note: the "network address" here is NOT the same as the IP address.
# See the Networking HOWTO.  In short, the network address is the IP
# address masked by the netmask.
#
case "$ADDRESS" in
home,*,*,*)
    # Transceiver selection, for some cards -- see 'man ifport'
    IF_PORT=""
    # Use BOOTP? [y/n]
    BOOTP="n"
    # Use DHCP? [y/n]
    DHCP="n"
    # Use DHCLIENT? [y/n]
    DHCLIENT="n"
    # Host's IP address, netmask, network address, broadcast address
    IPADDR="192.168.10.2"
    NETMASK="255.255.255.0"
    NETWORK="192.168.10.0"
    BROADCAST="192.168.10.255"
    # Gateway address for static routing
    GATEWAY="192.168.10.1"
    # Things to add to /etc/resolv.conf for this interface
    DOMAIN=""
    SEARCH=""
    # The nameserver IP addresses specified here complement the
    # nameservers already defined in /etc/resolv.conf.  These nameservers
    # will be added to /etc/resolv.conf automatically when the PCMCIA
    # network connection is established and removed from this file when
    # the connection is broken.
    DNS_1=""
    DNS_2=""
    DNS_3=""
    # NFS mounts, should be listed in /etc/fstab
    MOUNTS=""
    # For IPX interfaces, the frame type and network number
    IPX_FRAME=""
    IPX_NETNUM=""
    # Run ipmasq? [y/n]  (see the Debian ipmasq package)
    IPMASQ="n"
    # Extra stuff to do after setting up the interface
    start_fn () { return; }
    # Extra stuff to do before shutting down the interface
    stop_fn () { return; }
    ;;

work,*,*,*)
    # Transceiver selection, for some cards -- see 'man ifport'
    IF_PORT=""
    # Use BOOTP? [y/n]
    BOOTP="n"
    # Use DHCP? [y/n]
    DHCP="n"
    # Use DHCLIENT? [y/n]
    DHCLIENT="n"
    # Host's IP address, netmask, network address, broadcast address
    IPADDR="209.112.156.53"
    NETMASK="255.255.255.192"
    NETWORK="209.112.156.0"
    BROADCAST="209.112.156.63"
    # Gateway address for static routing
    GATEWAY="209.112.156.62"
    # Things to add to /etc/resolv.conf for this interface
    DOMAIN=""
    SEARCH=""
    # The nameserver IP addresses specified here complement the
    # nameservers already defined in /etc/resolv.conf.  These nameservers
    # will be added to /etc/resolv.conf automatically when the PCMCIA
    # network connection is established and removed from this file when
    # the connection is broken.
    DNS_1=""
    DNS_2=""
    DNS_3=""
    # NFS mounts, should be listed in /etc/fstab
    MOUNTS=""
    # For IPX interfaces, the frame type and network number
    IPX_FRAME=""
    IPX_NETNUM=""
    # Run ipmasq? [y/n]  (see the Debian ipmasq package)
    IPMASQ="n"
    # Extra stuff to do after setting up the interface
    start_fn () { return; }
    # Extra stuff to do before shutting down the interface
    stop_fn () { return; }
    ;;
esac

Reply to: