Portál AbcLinuxu, 25. listopadu 2026 02:31
).
dasd.agent ieee1394.agent net.agent scsi.agent usb.agent firmware.agent input.agent pci.agent tape.agent
Pro pcmcia se IMHO používá pci.agent, takže tam přidat (upravit) remove akci. Mohlo by to vypadat nějak takhle:
pci_map_modules < $MAP_CURRENT for MODULE in $DRIVERS ; do rmmod $MODULE done
To jsem teď napsal do prohlížeče, takže netuším, jestli to vůbec může fungovat
)
#!/bin/sh
# vim: syntax=sh
#
# pci.rc mostly to recover lost boot-time pci hotplug events
#
# $Id: pci.rc,v 1.7 2003/06/06 18:27:23 dbrownell Exp $
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
cd /etc/hotplug
. hotplug.functions
sys_file ()
{
cut -f2 -dx $DEVICE/$1
}
pci_boot_events ()
{
#
# FIXME on 2.5, /sys/bus/pci/devices gives some of this
# information, and more can be gotten with 'lspci'.
# don't expect pcimodules to exist!!
#
LISTER=`type -p pcimodules`
if [ "$LISTER" = "" -o ! -f /proc/bus/pci/devices -o ! -x pci.agent ]; then
echo $"** can't synthesize pci hotplug events"
return 1
fi
# make sure the pci agent will run
ACTION=add
PCI_CLASS=0
PCI_ID=0:0
PCI_SLOT=0:0.0
PCI_SUBSYS_ID=0:0
export ACTION PCI_CLASS PCI_ID PCI_SLOT PCI_SUBSYS_ID
case $KERNEL in
2.5*|2.6*)
for DEVICE in /sys/bus/pci/devices/*; do
PCI_CLASS=`sys_file class`
PCI_ID=`sys_file vendor`:`sys_file device`
PCI_SLOT=`echo $DEVICE | cut -d: -f2-`
PCI_SUBSYS_ID=`sys_file subsystem_vendor`:`sys_file subsystem_device`
/sbin/hotplug pci
done
;;
2.4*)
# these notifications will be handled by pcimodules
for BUS in `cd /proc/bus/pci;find * -type d -print`; do
for SLOT_FUNC in `cd /proc/bus/pci/$BUS; echo *`; do
PCI_SLOT=$BUS:$SLOT_FUNC
: hotplug pci for $PCI_SLOT
/sbin/hotplug pci
done
done
;;
esac
}
# See how we were called.
case "$1" in
start)
pci_boot_events
;;
stop)
# echo $"pci stop -- ignored"
;;
status)
echo $"PCI Status for kernel: " `uname -srm`
echo ''
if [ -f /proc/bus/pci/devices ]; then
COUNT=`ls /proc/bus/pci | wc -l`
if [ $COUNT -gt 1 ]; then
COUNT=`expr $COUNT - 1`
echo $"PCI up; bus count is $COUNT"
if [ -x /sbin/lspci ]; then
/sbin/lspci
fi
else
echo $"no PCI busses?"
fi
echo ''
else
echo $"no PCI /proc support?"
fi
echo ''
;;
restart)
# always invoke by absolute path, else PATH=$PATH:
$0 stop && $0 start
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
na co je /etc/pcmcia/config?
nasel jsem tam zaznam o sve karte:
card "Xircom R2BEM56G-100 CardBus 10/100 Ethernet + 56K Modem"
version "Xircom", "*", "R2BEM56G"
bind "tulip_cb" to 0, "serial_cb" to 1
na co tam je?
jeste jsem zjistil, ze kdyz vyndam wifi kartu(moduly orinoco_cs,orinoco) tak se moduly z jadra automaticky odstrani, ale kdyz vyndam tu xircom, tak tam zustanou.
A take me vadi, ze kdyz vyndam wifi kartu a zastrcim tu xircom, tak musim znovu nastavit pomoci ifconfig sit.
Ale kdyz vyndam wifi a znovu ji zandam, tak sit se sama zase nahodi.
JUR
O nahazování/shazování sítě by se měl starat net.agent...
case $ACTION in
add)
[...]
remove)
Tak za to remove ... pokud to tam neni, tak to do toho case pripis...
case $ACTION in
add)
pci_convert_vars
LABEL="PCI slot $PCI_SLOT"
# on 2.4 systems, modutils maintains MAP_CURRENT
if [ -r $MAP_CURRENT ]; then
load_drivers pci $MAP_CURRENT "$LABEL"
fi
if [ "$DRIVERS" == "" ]; then
mesg "... no modules for $LABEL"
exit 2
fi
;;
remove)
pci_map_modules < $MAP_CURRENT
for MODULE in $DRIVERS ; do
rmmod $MODULE
done
*)
debug_mesg PCI $ACTION event not supported
exit 1
;;
esac
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.