Bug 19553

Summary: pcmcia-cs wireless and wireless.opts not executed
Product: [Retired] Red Hat Linux Reporter: rushing
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-16 04:11:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rushing 2000-10-22 19:08:07 UTC
Redhat 7.0 using the default kernel-pcmcia-cs-2.2.16-22.    The
/etc/pcmcia/wireless script is never executed.

/etc/pcmcia/network  is the script from pcmcia-cs-2.8.8 that's moved into
the source tree from the src.rpm.    That older network script does not
include the call to /etc/pcmcia/wireless.   /etc/pcmcia/wireless and
/etc/pcmcia/wireless.opts are therefore never executed when a wireless card
is inserted.   

My solution is to take the first part of the pcmcia-cs-3.1.19 network
script that deals with calling /etc/pcmcia/wireless and combine it with the
pcmcia-cs-2.8.8 network script that you are using (which points the pcmcia
network starts into /etc/sysconfig/network-scripts/)

This allows my lucent wavelan/ieee card to get the wireless settings (like
the encryption key) before the interface is brought up and also use dhcp if
needed.  (can't use dhcp without the key set)

i've checked the 2.4 kernel srpm on rawhide and this issue appears to apply
to that as well.

#! /bin/sh
#
# NOte:  merged 3.1.19 with redhat 7's 2.8.8 script to keep
#  the network settings in /etc/sysconfig/network-scripts
#  but still use ./wireless and  ./wireless.opts
#
# Initialize or shutdown a PCMCIA ethernet adapter
#
# This script should be invoked with two arguments.  The first is the
# action to be taken, either "start", "stop", or "restart".  The
# second is the network interface name.
#
# The script passes an extended device address to 'network.opts' in
# the ADDRESS variable, to retrieve device-specific configuration
# options.  The address format is "scheme,socket,instance,hwaddr"
# where "scheme" is the current PCMCIA device configuration scheme,
# "socket" is the socket number, "instance" is used to number multiple
# interfaces in a single socket, and "hwaddr" is the card's hardware
# ethernet address.
#

if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi

# Get device attributes
get_info $DEVICE
HWADDR=`/sbin/ifconfig $DEVICE | sed -n -e 's/.*addr \([^ ]*\) */\1/p'`

# Load site-specific settings
ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
start_fn () { return; }
stop_fn () { return; }
. $0.opts

RESOLV=/etc/resolv.conf

# Now, run the specific script for Wireless LAN interfaces
# Note : we need the wireless parameters to be set up before IP parameters,
# so that we can perform DHCP over the Wireless link if needed. Jean II
if [ -x ./wireless ] ; then
    . ./wireless
else
    . /etc/pcmcia/wireless
fi

match () { case $1 in $2) return 0; ;; *) return 1; ;; esac ; }

#
# network.sample $Revision: 1.1 $ $Date: 1995/05/25 04:30:06 $ (David
Hinds)
#
# Initialize or shutdown a PCMCIA ethernet adapter
#
# This script should be invoked with two arguments.  The first is the
# action to be taken, either "start", "stop", or "restart".  The
# second is the network interface name.

action=$1
device=$2

case "${action:?}" in
'start')
	/etc/sysconfig/network-scripts/ifup ifcfg-${device}
    ;;
'stop')
	/etc/sysconfig/network-scripts/ifdown ifcfg-${device}
    ;;
'restart')
    /sbin/ifconfig ${device:?} down up
    ;;
esac

Comment 1 David Hinds 2000-11-22 02:42:02 UTC
This is another consequence of Red Hat using their own /etc/pcmcia/network
script instead of adding their customizations to network.opts.  The 3.1.22
package will automatically install network and network.opts scripts that work
the same as Red Hat's network script, and also behave correctly with respect to
the wireless stuff.

-- Dave