diff options
Diffstat (limited to 'sys-apps/hotplug/files/pci.rc')
-rw-r--r-- | sys-apps/hotplug/files/pci.rc | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/sys-apps/hotplug/files/pci.rc b/sys-apps/hotplug/files/pci.rc deleted file mode 100644 index b76cbbb0a7b5..000000000000 --- a/sys-apps/hotplug/files/pci.rc +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# -# pci.rc mostly to recover lost boot-time pci hotplug events -# -# $Id: pci.rc,v 1.2 2002/02/25 23:02:14 woodchip Exp $ -# -# Modified for Gentoo Linux, sworley 2002-02-20 - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -cd /etc/hotplug - -. hotplug.functions - -# # override any of the defaults? -if [ -f /etc/conf.d/pci ] ; then - . /etc/conf.d/pci -fi - -pci_boot_events () -{ - 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 - - # Alternatively, parse /proc/bus/pci/devices to find - # which pci slots don't have drivers. That's messy to - # parse, and hides PCI_CLASS and PCI_SUBSYS_ID. At - # least PCI_CLASS is used by common drivers (USB hcds). - - # 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 -} - -# 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 |