summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2003-03-11 07:38:06 +0000
committerSeemant Kulleen <seemant@gentoo.org>2003-03-11 07:38:06 +0000
commit9ee8fdc47bf9aa243d3cf553f52077d28fd1e48c (patch)
tree0261192a5ce340be0c297e2e50df0c318445ef95 /sys-apps/hotplug
parentnew version, supports standard configure; make; make install stuff now.. (diff)
downloadgentoo-2-9ee8fdc47bf9aa243d3cf553f52077d28fd1e48c.tar.gz
gentoo-2-9ee8fdc47bf9aa243d3cf553f52077d28fd1e48c.tar.bz2
gentoo-2-9ee8fdc47bf9aa243d3cf553f52077d28fd1e48c.zip
many fixes
Diffstat (limited to 'sys-apps/hotplug')
-rw-r--r--sys-apps/hotplug/ChangeLog18
-rw-r--r--sys-apps/hotplug/files/digest-hotplug-200201141
-rw-r--r--sys-apps/hotplug/files/digest-hotplug-200204011
-rw-r--r--sys-apps/hotplug/files/digest-hotplug-20020401-r12
-rw-r--r--sys-apps/hotplug/files/digest-hotplug-200208262
-rw-r--r--sys-apps/hotplug/files/hotplug-20020401-net.agent-gentoo.diff48
-rw-r--r--sys-apps/hotplug/files/hotplug-20020401-pci.rc-gentoo.diff39
-rw-r--r--sys-apps/hotplug/files/hotplug-20020401-usb.agent-gentoo.diff14
-rw-r--r--sys-apps/hotplug/files/hotplug-20020401-usb.rc-gentoo.diff29
-rw-r--r--sys-apps/hotplug/files/hotplug-20020826-net.agent-gentoo.diff48
-rw-r--r--sys-apps/hotplug/files/hotplug-20020826-pci.rc-gentoo.diff39
-rw-r--r--sys-apps/hotplug/files/hotplug-20020826-usb.agent-gentoo.diff14
-rw-r--r--sys-apps/hotplug/files/hotplug-20020826-usb.rc-gentoo.diff29
-rw-r--r--sys-apps/hotplug/files/hotplug.rc46
-rw-r--r--sys-apps/hotplug/files/pci.rc88
-rw-r--r--sys-apps/hotplug/files/usb.conf7
-rw-r--r--sys-apps/hotplug/files/usb.rc248
-rw-r--r--sys-apps/hotplug/hotplug-20020114.ebuild29
-rw-r--r--sys-apps/hotplug/hotplug-20020401-r1.ebuild27
-rw-r--r--sys-apps/hotplug/hotplug-20020401.ebuild51
-rw-r--r--sys-apps/hotplug/hotplug-20020826.ebuild27
21 files changed, 64 insertions, 743 deletions
diff --git a/sys-apps/hotplug/ChangeLog b/sys-apps/hotplug/ChangeLog
index 01607a57133a..45959e11dbd9 100644
--- a/sys-apps/hotplug/ChangeLog
+++ b/sys-apps/hotplug/ChangeLog
@@ -1,10 +1,26 @@
# ChangeLog for sys-apps/hotplug
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/ChangeLog,v 1.9 2003/02/12 09:00:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/ChangeLog,v 1.10 2003/03/11 07:38:06 seemant Exp $
06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
*hotplug-20020826 (18 Oct 2002)
+
+ 10 Mar 2003; Seemant Kulleen <seemant@gentoo.org> hotplug-20020114.ebuild,
+ hotplug-20020401-r1.ebuild, hotplug-20020401.ebuild,
+ hotplug-20020401.ebuild, hotplug-20020826.ebuild,
+ files/hotplug-20020401-net.agent-gentoo.diff,
+ files/hotplug-20020401-pci.rc-gentoo.diff,
+ files/hotplug-20020401-usb.agent-gentoo.diff,
+ files/hotplug-20020401-usb.rc-gentoo.diff,
+ files/hotplug-20020826-net.agent-gentoo.diff,
+ files/hotplug-20020826-pci.rc-gentoo.diff,
+ files/hotplug-20020826-usb.agent-gentoo.diff,
+ files/hotplug-20020826-usb.rc-gentoo.diff, files/hotplug.rc, files/pci.rc,
+ files/usb.conf, files/usb.rc:
+ moved patches out to mirrors, and better manipulation thanks to carpaski;
+ finally, use epatch instead
+
18 Oct 2002; Zach Welch <zwelch@gentoo.org> hotplug-20020826.build :
New version; includes gentoo agent fixes in hotplug-20020401-r1
diff --git a/sys-apps/hotplug/files/digest-hotplug-20020114 b/sys-apps/hotplug/files/digest-hotplug-20020114
index 7e7e7441a824..5725507f6fcb 100644
--- a/sys-apps/hotplug/files/digest-hotplug-20020114
+++ b/sys-apps/hotplug/files/digest-hotplug-20020114
@@ -1 +1,2 @@
MD5 103073780a9c513392998b077daa7b06 hotplug-2002_01_14.tar.gz 41667
+MD5 4f993af8adc6c016fd8efabf9fd41f4c hotplug-gentoo-conf.tar.bz2 4255
diff --git a/sys-apps/hotplug/files/digest-hotplug-20020401 b/sys-apps/hotplug/files/digest-hotplug-20020401
deleted file mode 100644
index d02541276722..000000000000
--- a/sys-apps/hotplug/files/digest-hotplug-20020401
+++ /dev/null
@@ -1 +0,0 @@
-MD5 50792a87d2eea046616d815e03d1af6b hotplug-2002_04_01.tar.gz 36984
diff --git a/sys-apps/hotplug/files/digest-hotplug-20020401-r1 b/sys-apps/hotplug/files/digest-hotplug-20020401-r1
index d02541276722..97385a1033b5 100644
--- a/sys-apps/hotplug/files/digest-hotplug-20020401-r1
+++ b/sys-apps/hotplug/files/digest-hotplug-20020401-r1
@@ -1 +1,3 @@
MD5 50792a87d2eea046616d815e03d1af6b hotplug-2002_04_01.tar.gz 36984
+MD5 4f993af8adc6c016fd8efabf9fd41f4c hotplug-gentoo-conf.tar.bz2 4255
+MD5 6f6f3920aacfc3d8faca0aaf20a170cf hotplug-20020401-gentoo-patches.tar.bz2 2802
diff --git a/sys-apps/hotplug/files/digest-hotplug-20020826 b/sys-apps/hotplug/files/digest-hotplug-20020826
index 9a8988c092a2..f688d2cecefa 100644
--- a/sys-apps/hotplug/files/digest-hotplug-20020826
+++ b/sys-apps/hotplug/files/digest-hotplug-20020826
@@ -1 +1,3 @@
MD5 eb3e3aacfe072e7bd31a4e01fd8af2e0 hotplug-2002_08_26.tar.gz 37805
+MD5 4f993af8adc6c016fd8efabf9fd41f4c hotplug-gentoo-conf.tar.bz2 4255
+MD5 9db8567ab6ae2a5d297eca8ab1ab2960 hotplug-20020826-gentoo-patches.tar.bz2 2792
diff --git a/sys-apps/hotplug/files/hotplug-20020401-net.agent-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020401-net.agent-gentoo.diff
deleted file mode 100644
index 638f48f3ab8f..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020401-net.agent-gentoo.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -auNr hotplug-2002_08_26-orig/etc/hotplug/net.agent hotplug-2002_08_26/etc/hotplug/net.agent
---- hotplug-2002_08_26-orig/etc/hotplug/net.agent 2001-09-19 17:14:00.000000000 -0700
-+++ hotplug-2002_08_26/etc/hotplug/net.agent 2002-10-18 11:58:57.000000000 -0700
-@@ -40,8 +40,12 @@
- # we can't do much here without distro-specific knowledge
- # such as whether/how to invoke DHCP, set up bridging, etc.
-
-+ # handle gentoo init script style
-+ if [ -x /etc/init.d/net.$INTERFACE ]; then
-+ debug_mesg invoke /etc/init.d/net.$INTERFACE start
-+ exec /etc/init.d/net.$INTERFACE start
- # RedHat and similar
-- if [ -x /sbin/ifup ]; then
-+ elif [ -x /sbin/ifup ]; then
- debug_mesg invoke ifup $INTERFACE
- exec /sbin/ifup $INTERFACE
- else
-@@ -52,6 +56,30 @@
- mesg $1 $ACTION event not handled
- ;;
-
-+unregister)
-+ case $INTERFACE in
-+ # interfaces that are unregistered after being "down" (?)
-+ ppp*|ippp*|isdn*|plip*|lo*|irda*)
-+ debug_mesg assuming $INTERFACE is already down
-+ exit 0
-+ ;;
-+ *)
-+ # handle gentoo init script style
-+ if [ -x /etc/init.d/net.$INTERFACE ]; then
-+ debug_mesg invoke /etc/init.d/net.$INTERFACE stop
-+ exec /etc/init.d/net.$INTERFACE stop
-+ # RedHat and similar
-+ elif [ -x /sbin/ifdown ]; then
-+ debug_mesg invoke ifdown $INTERFACE
-+ exec /sbin/ifdown $INTERFACE
-+ else
-+ mesg "how do I bring interfaces down on this distro?"
-+ fi
-+ ;;
-+ esac
-+ mesg $1 $ACTION event not handled
-+ ;;
-+
- *)
- debug_mesg NET $ACTION event not supported
- exit 1 ;;
diff --git a/sys-apps/hotplug/files/hotplug-20020401-pci.rc-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020401-pci.rc-gentoo.diff
deleted file mode 100644
index f65ef2449dff..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020401-pci.rc-gentoo.diff
+++ /dev/null
@@ -1,39 +0,0 @@
---- pci.rc.orig Fri May 10 18:31:51 2002
-+++ pci.rc Fri May 10 19:02:00 2002
-@@ -9,27 +9,14 @@
-
- cd /etc/hotplug
-
--# source function library
--if [ -f /etc/init.d/functions ]; then
-- . /etc/init.d/functions
--elif [ -f /etc/rc.d/init.d/functions ]; then
-- . /etc/rc.d/init.d/functions
--fi
--
- . hotplug.functions
-
--
--# # override any of the defaults?
--# if [ -f /etc/sysconfig/pci ]; then
--# . /etc/sysconfig/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
-+ return 1
- fi
-
- # make sure the pci agent will run
-@@ -61,7 +48,6 @@
- pci_boot_events
- ;;
- stop)
-- echo $"pci stop -- ignored"
- ;;
- status)
- echo $"PCI Status for kernel: " `uname -srm`
diff --git a/sys-apps/hotplug/files/hotplug-20020401-usb.agent-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020401-usb.agent-gentoo.diff
deleted file mode 100644
index a756ba7d335f..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020401-usb.agent-gentoo.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -auNr hotplug-2002_08_26-orig/etc/hotplug/usb.agent hotplug-2002_08_26/etc/hotplug/usb.agent
---- hotplug-2002_08_26-orig/etc/hotplug/usb.agent 2002-08-13 14:59:32.000000000 -0700
-+++ hotplug-2002_08_26/etc/hotplug/usb.agent 2002-10-18 14:26:22.000000000 -0700
-@@ -56,8 +57,8 @@
- # $Id: hotplug-20020401-usb.agent-gentoo.diff,v 1.1 2002/10/19 22:04:02 zwelch Exp $
- #
-
--if [ -f /etc/sysconfig/usb ]; then
-- . /etc/sysconfig/usb
-+if [ -f /etc/conf.d/usb ]; then
-+ . /etc/conf.d/usb
- fi
-
- cd /etc/hotplug
diff --git a/sys-apps/hotplug/files/hotplug-20020401-usb.rc-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020401-usb.rc-gentoo.diff
deleted file mode 100644
index 149c1dbcc97d..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020401-usb.rc-gentoo.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- usb.rc.orig Fri May 10 18:32:00 2002
-+++ usb.rc Fri May 10 19:01:14 2002
-@@ -17,23 +17,16 @@
- # EHCI/OHCI/UHCI/..., hid, input, keybdev; and likely mousedev) so the
- # system console can't be removed by accident.
-
-+# Adapted for gentoo by wmertens
-
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
- STATIC_MODULE_LIST=
- X11_USBMICE_HACK=false
-
--# source function library
--if [ -f /etc/init.d/functions ]; then
-- . /etc/init.d/functions
--elif [ -f /etc/rc.d/init.d/functions ]; then
-- . /etc/rc.d/init.d/functions
--fi
--
--
- # override any of the defaults above?
--if [ -f /etc/sysconfig/usb ]; then
-- . /etc/sysconfig/usb
-+if [ -f /etc/conf.d/usb ]; then
-+ . /etc/conf.d/usb
- fi
-
-
diff --git a/sys-apps/hotplug/files/hotplug-20020826-net.agent-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020826-net.agent-gentoo.diff
deleted file mode 100644
index 638f48f3ab8f..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020826-net.agent-gentoo.diff
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -auNr hotplug-2002_08_26-orig/etc/hotplug/net.agent hotplug-2002_08_26/etc/hotplug/net.agent
---- hotplug-2002_08_26-orig/etc/hotplug/net.agent 2001-09-19 17:14:00.000000000 -0700
-+++ hotplug-2002_08_26/etc/hotplug/net.agent 2002-10-18 11:58:57.000000000 -0700
-@@ -40,8 +40,12 @@
- # we can't do much here without distro-specific knowledge
- # such as whether/how to invoke DHCP, set up bridging, etc.
-
-+ # handle gentoo init script style
-+ if [ -x /etc/init.d/net.$INTERFACE ]; then
-+ debug_mesg invoke /etc/init.d/net.$INTERFACE start
-+ exec /etc/init.d/net.$INTERFACE start
- # RedHat and similar
-- if [ -x /sbin/ifup ]; then
-+ elif [ -x /sbin/ifup ]; then
- debug_mesg invoke ifup $INTERFACE
- exec /sbin/ifup $INTERFACE
- else
-@@ -52,6 +56,30 @@
- mesg $1 $ACTION event not handled
- ;;
-
-+unregister)
-+ case $INTERFACE in
-+ # interfaces that are unregistered after being "down" (?)
-+ ppp*|ippp*|isdn*|plip*|lo*|irda*)
-+ debug_mesg assuming $INTERFACE is already down
-+ exit 0
-+ ;;
-+ *)
-+ # handle gentoo init script style
-+ if [ -x /etc/init.d/net.$INTERFACE ]; then
-+ debug_mesg invoke /etc/init.d/net.$INTERFACE stop
-+ exec /etc/init.d/net.$INTERFACE stop
-+ # RedHat and similar
-+ elif [ -x /sbin/ifdown ]; then
-+ debug_mesg invoke ifdown $INTERFACE
-+ exec /sbin/ifdown $INTERFACE
-+ else
-+ mesg "how do I bring interfaces down on this distro?"
-+ fi
-+ ;;
-+ esac
-+ mesg $1 $ACTION event not handled
-+ ;;
-+
- *)
- debug_mesg NET $ACTION event not supported
- exit 1 ;;
diff --git a/sys-apps/hotplug/files/hotplug-20020826-pci.rc-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020826-pci.rc-gentoo.diff
deleted file mode 100644
index f65ef2449dff..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020826-pci.rc-gentoo.diff
+++ /dev/null
@@ -1,39 +0,0 @@
---- pci.rc.orig Fri May 10 18:31:51 2002
-+++ pci.rc Fri May 10 19:02:00 2002
-@@ -9,27 +9,14 @@
-
- cd /etc/hotplug
-
--# source function library
--if [ -f /etc/init.d/functions ]; then
-- . /etc/init.d/functions
--elif [ -f /etc/rc.d/init.d/functions ]; then
-- . /etc/rc.d/init.d/functions
--fi
--
- . hotplug.functions
-
--
--# # override any of the defaults?
--# if [ -f /etc/sysconfig/pci ]; then
--# . /etc/sysconfig/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
-+ return 1
- fi
-
- # make sure the pci agent will run
-@@ -61,7 +48,6 @@
- pci_boot_events
- ;;
- stop)
-- echo $"pci stop -- ignored"
- ;;
- status)
- echo $"PCI Status for kernel: " `uname -srm`
diff --git a/sys-apps/hotplug/files/hotplug-20020826-usb.agent-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020826-usb.agent-gentoo.diff
deleted file mode 100644
index 7d7ea5957f00..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020826-usb.agent-gentoo.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -auNr hotplug-2002_08_26-orig/etc/hotplug/usb.agent hotplug-2002_08_26/etc/hotplug/usb.agent
---- hotplug-2002_08_26-orig/etc/hotplug/usb.agent 2002-08-13 14:59:32.000000000 -0700
-+++ hotplug-2002_08_26/etc/hotplug/usb.agent 2002-10-18 14:26:22.000000000 -0700
-@@ -57,8 +57,8 @@
- # $Id: hotplug-20020826-usb.agent-gentoo.diff,v 1.1 2002/10/19 22:04:02 zwelch Exp $
- #
-
--if [ -f /etc/sysconfig/usb ]; then
-- . /etc/sysconfig/usb
-+if [ -f /etc/conf.d/usb ]; then
-+ . /etc/conf.d/usb
- fi
-
- cd /etc/hotplug
diff --git a/sys-apps/hotplug/files/hotplug-20020826-usb.rc-gentoo.diff b/sys-apps/hotplug/files/hotplug-20020826-usb.rc-gentoo.diff
deleted file mode 100644
index 149c1dbcc97d..000000000000
--- a/sys-apps/hotplug/files/hotplug-20020826-usb.rc-gentoo.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- usb.rc.orig Fri May 10 18:32:00 2002
-+++ usb.rc Fri May 10 19:01:14 2002
-@@ -17,23 +17,16 @@
- # EHCI/OHCI/UHCI/..., hid, input, keybdev; and likely mousedev) so the
- # system console can't be removed by accident.
-
-+# Adapted for gentoo by wmertens
-
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
- STATIC_MODULE_LIST=
- X11_USBMICE_HACK=false
-
--# source function library
--if [ -f /etc/init.d/functions ]; then
-- . /etc/init.d/functions
--elif [ -f /etc/rc.d/init.d/functions ]; then
-- . /etc/rc.d/init.d/functions
--fi
--
--
- # override any of the defaults above?
--if [ -f /etc/sysconfig/usb ]; then
-- . /etc/sysconfig/usb
-+if [ -f /etc/conf.d/usb ]; then
-+ . /etc/conf.d/usb
- fi
-
-
diff --git a/sys-apps/hotplug/files/hotplug.rc b/sys-apps/hotplug/files/hotplug.rc
deleted file mode 100644
index 3a85a9d8d854..000000000000
--- a/sys-apps/hotplug/files/hotplug.rc
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# /space/gentoo/cvsroot/gentoo-x86/sys-apps/hotplug/files/hotplug.rc,v 1.2 2002/02/25 23:02:14 woodchip Exp
-
-depend() {
- need modules
-}
-
-checkconfig() {
- if [ ! -d /etc/hotplug ] ; then
- eerror "Hotplug requires scripts & configs in /etc/hotplug !"
- return 1
- fi
-}
-
-start() {
- local error
- checkconfig || return 1
- ebegin "Starting USB and PCI hotplugging"
- for RC in /etc/hotplug/*.rc
- do
- $RC start
- error=$?
- if [ $error -ne 0 ] ; then
- eend ${error} "hotplug script $RC failed at start"
- return 1
- fi
- done
- eend
-}
-
-stop() {
- local error
- ebegin "Stopping USB and PCI hotplugging"
- for RC in /etc/hotplug/*.rc
- do
- $RC stop
- error=$?
- if [ $error -ne 0 ] ; then
- eend ${error} "hot plug script $RC failed at stop"
- return 1
- fi
- done
- eend
-}
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
diff --git a/sys-apps/hotplug/files/usb.conf b/sys-apps/hotplug/files/usb.conf
deleted file mode 100644
index a7b4e0be0e48..000000000000
--- a/sys-apps/hotplug/files/usb.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# If you have a USB mouse, you probably want to enable the following,
-# and change your XFree86 configuration so that it uses /dev/input/mice
-# as the mouse input device
-#X11_USBMICE_HACK=true
-
-# Put any modules here that you want to be loaded by the USB hotplug system
-#STATIC_MODULE_LIST=
diff --git a/sys-apps/hotplug/files/usb.rc b/sys-apps/hotplug/files/usb.rc
deleted file mode 100644
index 0a221eefcf29..000000000000
--- a/sys-apps/hotplug/files/usb.rc
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/bin/sh
-#
-# usb.rc This brings the USB subsystem up and down safely.
-#
-# $Id: usb.rc,v 1.2 2002/02/25 23:02:14 woodchip Exp $
-#
-# Best invoked via /etc/init.d/hotplug or equivalent, with
-# writable /tmp, /usr mounted, and syslogging active.
-#
-# Bus management is basically unrelated to runlevel changes; it
-# relates to physical topology, including possibly hotpluggable
-# busses (USB, Cardbus) or controllers. If a bus is physically
-# present, it should normally be available.
-#
-# USB-dependant systems (iMacs, Aero, and so on) should statically
-# link USB keyboard support into the kernel (USB core, UHCI/OHCI,
-# hid, input, keybdev; and likely mousedev) so the system console
-# can't be removed by accident.
-#
-# Modified for Gentoo linux, sworley 2002-02-20
-
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-
-STATIC_MODULE_LIST=
-# USBD_ENABLE=true
-X11_USBMICE_HACK=false
-
-# override any of the defaults above?
-if [ -f /etc/conf.d/usb ]; then
- . /etc/conf.d/usb
- # e.g. USBD_ENABLE=false but STATIC_MODULE_LIST has your devices
-fi
-
-MOUSE_MODULES="mousedev input"
-
-# In its currently-recommended configuration, XFree86 3.3.6 always opens
-# /dev/input/mice; so mousedev and input must be loaded before X11 starts.
-if [ $X11_USBMICE_HACK = true ]; then
- STATIC_MODULE_LIST="$MOUSE_MODULES $STATIC_MODULE_LIST"
-fi
-
-
-usb_boot_events ()
-{
- # synthesize hotplug events if we can
- # we need (non-bash) programs to parse descriptors.
- LISTER=`type -p usbmodules`
- if [ "$LISTER" = "" -o ! -f /proc/bus/usb/devices ]; then
- echo $"** can't synthesize root hub events"
- return 1
- fi
-
- # make sure the usb agent will run
- ACTION=add
- PRODUCT=0/0/0
- export ACTION PRODUCT
-
- DEVFS=/proc/bus/usb
- DEVICE=
- export DEVFS DEVICE
-
- # these notifications will be handled by pcimodules
- for DEVICE in /proc/bus/usb/*/*
- do
- /etc/hotplug/usb.agent
- done
-}
-
-
-maybe_start_usb ()
-{
- local COUNT SYNTHESIZE
- COUNT=0
- SYNTHESIZE=false
-
- # if USB is partially initted, synthesize hotplug events since
- # the kernel probably dropped them (missing root, unwritable /tmp)
- if [ -d /proc/bus/usb -a `ls /proc/bus/usb 2>&1 | wc -l` -gt 2 ]; then
- SYNTHESIZE=true
- fi
-
- # if distro hasn't already done part of this ... load core,
- # and mount usbdevfs before the first hotplug agent fires
- # (so it'll be available to the agents).
- modprobe -q usbcore >/dev/null 2>&1
- if [ -d /proc/bus/usb ]; then
- # if it's not mounted, try to mount it
- if [ ! -f /proc/bus/usb/devices ]; then
- if grep -q "[ ]/proc/bus/usb[ ]" /etc/fstab ; then
- mount /proc/bus/usb
- else
- mount -t usbdevfs usbdevfs /proc/bus/usb
- fi
- fi
- fi
-
- # Load Host Controller Drivers (HCDs) ... this automatically handles
- # systems with _both_ UHCI and OHCI controllers, without relying on
- # /proc or tools (lspci -v|grep USB, etc) to do so. If hotplugging
- # is enabled on this system, initting a root hub will cause hotplug
- # events to fire for every device on the tree at that root.
-
- # NOTE: this prefers "usb-uhci"; you may prefer "uhci".
-
- # FIXME: all this should be driven by PCI hotplugging, and have
- # the blacklist control which uhci driver gets used.
-
- modprobe -q ehci-hcd >/dev/null 2>&1
- modprobe -q usb-ohci >/dev/null 2>&1
- modprobe -q usb-uhci >/dev/null 2>&1 || modprobe -q uhci >/dev/null 2>&1
- # modprobe -q uhci >/dev/null 2>&1 || modprobe -q usb-uhci >/dev/null 2>&1
-
- if [ -d /proc/bus/usb ]; then
- # If we see there are no busses, we "failed" and
- # can report so even if we're partially nonmodular.
- COUNT=`ls /proc/bus/usb | wc -l`
- if [ $COUNT -le 2 ]; then
- umount /proc/bus/usb
- rmmod usbcore >/dev/null 2>&1
- return 1
- fi
-
- # if USB is fully modular and yet can clean up,
- # we know init failed without needing usbdevfs
- elif rmmod usbcore >/dev/null 2>&1; then
- return 1
- fi
-
- # hotplug events didn't fire during booting;
- # cope with devices that enumerated earlier
- # and may not have been fully configured.
- if [ $SYNTHESIZE = true ]; then
- usb_boot_events
- fi
-
- # Some modules are statically loaded, perhaps because they are
- # needed to activate filesystem device nodes.
- for MODULE in $STATIC_MODULE_LIST; do
- modprobe $MODULE
- done
-
- # we did everything we could ...
- return 0
-}
-
-maybe_stop_usb ()
-{
- # call this multiple times if you had to take down components of the
- # USB subsystem by hand; it cleans up whatever can
- # be cleaned up, letting the system quiesce further.
-
- # disconnect all controllers we can, and kernel drivers
- # HCDs first, so most drivers reduce their use counts.
- rmmod usb-ohci usb-uhci uhci >/dev/null 2>&1
- rmmod ehci-hcd hcd >/dev/null 2>&1
-
- # user mode code may keep usbdevfs busy for a while yet ...
-
- # OK, usbcore won't actually be removed unless there happen to be
- # no USB drivers loaded, and usbdevfs isn't mounted. let's force
- # removal of autocleanable modules before trying to rmmod usbcore
- rmmod -as
-
- # Now let's workaround the fact that some USB modules never increase
- # their module use counts, so that "rmmod -a" won't unload them.
- # (And we can't use "modprobe --autoclean" anyway.)
-
- rmmod joydev keybdev wacom wmforce >/dev/null 2>&1
- rmmod cpia_usb cpia dc2xx rio500 mdc800 scanner >/dev/null 2>&1
- rmmod acm audio ibmcam uss720 printer hid >/dev/null 2>&1
- rmmod microtek dsbr100 evdev pegasus plusb >/dev/null 2>&1
- rmmod usb-serial usb-storage net1080 usbnet kaweth >/dev/null 2>&1
- rmmod ov511 videodev belkin_sa digi_acceleport empeg ftdi_sio >/dev/null 2>&1
- rmmod keyspan_pda keyspan omninet visor whiteheat usbserial >/dev/null 2>&1
- rmmod bluetooth dabusb mct_u232 >/dev/null 2>&1
- rmmod usbmouse usbkbd >/dev/null 2>&1
-
- rmmod $STATIC_MODULE_LIST >/dev/null 2>&1
-
- # ok, hope that user mode drivers/managers closed their fds.
- umount /proc/bus/usb >/dev/null 2>&1
-
- rmmod usbcore >/dev/null 2>&1
-
- # we did everything we could ...
- return 0;
-}
-
-# See how we were called.
-case "$1" in
- start)
- maybe_start_usb
- ;;
- stop)
- maybe_stop_usb
- ;;
- status)
- echo $"USB Status for kernel: " `uname -srm`
- echo ''
-
- if [ -f /proc/bus/usb/devices ]; then
- COUNT=`ls /proc/bus/usb | wc -l`
- if [ $COUNT -gt 2 ]; then
- COUNT=`expr $COUNT - 2`
- echo $"USB up; bus count is $COUNT"
- grep "^[TPSI]:" /proc/bus/usb/devices
- else
- echo $"$USB-devfs partially up; no busses"
- fi
- echo ''
-
- echo $"USB Drivers Loaded: "
- cat /proc/bus/usb/drivers
- else
- echo $"USB-devfs is unavailable. "
- if [ -f /proc/modules ] && fgrep -q usbcore /proc/modules; then
- echo $"USB module is loaded. "
- else
- echo $"USB may be statically linked. "
- fi
- echo $"If khubd is running, that shows USB is available."
- fi
- echo ''
-
- if [ -f /proc/sys/kernel/hotplug ]; then
- echo $"khubd/hotplug thread: "
- else
- echo $"khubd thread:"
- fi
- ps -l | head -1
- ps -Al | egrep 'khubd' | grep -v grep
- echo ''
-
- lsmod
- echo ''
-
- # /proc/devices too? "usb", "input", and others ...
-
- ;;
- restart)
- # always invoke by absolute path, else PATH=$PATH:
- $0 stop && $0 start
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart}"
- exit 1
-esac
diff --git a/sys-apps/hotplug/hotplug-20020114.ebuild b/sys-apps/hotplug/hotplug-20020114.ebuild
index 77a14898e0dd..d92fd3ecff09 100644
--- a/sys-apps/hotplug/hotplug-20020114.ebuild
+++ b/sys-apps/hotplug/hotplug-20020114.ebuild
@@ -1,30 +1,29 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020114.ebuild,v 1.11 2003/02/13 16:00:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020114.ebuild,v 1.12 2003/03/11 07:38:06 seemant Exp $
# source maintainers named it hotplug-YYYY_MM_DD instead of hotplug-YYYYMMDD
-S=${WORKDIR}/${P}
+MY_P=${PN}-${PV:0:4}_${PV:4:2}_${PV:6:2}
+S=${WORKDIR}/${MY_P}
DESCRIPTION="USB hotplug utilities"
-SRC_URI="mirror://sourceforge/linux-hotplug/hotplug-2002_01_14.tar.gz"
HOMEPAGE="http://linux-hotplug.sourceforge.net"
-KEYWORDS="x86 ppc sparc "
+SRC_URI="mirror://sourceforge/linux-hotplug/${MY_P}.tar.gz
+ mirror://gentoo/${PN}-gentoo-conf.tar.bz2"
+
SLOT="0"
LICENSE="GPL-2"
+KEYWORDS="x86 ppc sparc"
# hotplug needs pcimodules utility provided by pcitutils-2.1.9-r1
-DEPEND="virtual/glibc
- >=sys-apps/pciutils-2.1.9
- >=sys-apps/usbutils-0.9"
+DEPEND=">=sys-apps/pciutils-2.1.9
+ >=sys-apps/usbutils-0.9"
src_unpack() {
unpack ${A}
- # move it to dir which matches ebuild name
- mv ${WORKDIR}/hotplug-2002_01_14 ${S}
-
# replace scripts which have redhat specific stuff
- cp ${FILESDIR}/pci.rc ${S}/etc/hotplug/pci.rc
- cp ${FILESDIR}/usb.rc ${S}/etc/hotplug/usb.rc
+ cp ${WORKDIR}/hotplug-conf/pci.rc ${S}/etc/hotplug/pci.rc
+ cp ${WORKDIR}/hotplug-conf/usb.rc ${S}/etc/hotplug/usb.rc
}
src_compile() {
@@ -50,8 +49,8 @@ src_install() {
exeinto /etc/hotplug
doexe *.agent
- newexe ${FILESDIR}/pci.rc pci.rc
- newexe ${FILESDIR}/usb.rc usb.rc
+ newexe ${WORKDIR}/hotplug-conf/pci.rc pci.rc
+ newexe ${WORKDIR}/hotplug-conf/usb.rc usb.rc
exeinto /etc/init.d
- newexe ${FILESDIR}/hotplug.rc hotplug
+ newexe ${WORKDIR}/hotplug-conf/hotplug.rc hotplug
}
diff --git a/sys-apps/hotplug/hotplug-20020401-r1.ebuild b/sys-apps/hotplug/hotplug-20020401-r1.ebuild
index facf7fc175e6..32306aec9a9b 100644
--- a/sys-apps/hotplug/hotplug-20020401-r1.ebuild
+++ b/sys-apps/hotplug/hotplug-20020401-r1.ebuild
@@ -1,30 +1,31 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020401-r1.ebuild,v 1.4 2003/02/13 16:00:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020401-r1.ebuild,v 1.5 2003/03/11 07:38:06 seemant Exp $
+
+inherit eutils
# source maintainers named it hotplug-YYYY_MM_DD instead of hotplug-YYYYMMDD
-MY_P=`echo ${P}|sed 's/-\(....\)\(..\)\(..\)/-\1_\2_\3/'`
+MY_P=${PN}-${PV:0:4}_${PV:4:2}_${PV:6:2}
S=${WORKDIR}/${MY_P}
DESCRIPTION="USB and PCI hotplug scripts"
-SRC_URI="http://unc.dl.sourceforge.net/sourceforge/linux-hotplug/${MY_P}.tar.gz"
HOMEPAGE="http://linux-hotplug.sourceforge.net"
-KEYWORDS="x86 ~ppc"
+SRC_URI="mirror://sourceforge/linux-hotplug/${MY_P}.tar.gz
+ mirror://gentoo/${PN}-gentoo-conf.tar.bz2
+ mirror://gentoo/${P}-gentoo-patches.tar.bz2"
+
SLOT="0"
LICENSE="GPL-2"
+KEYWORDS="x86 ~ppc"
# hotplug needs pcimodules utility provided by pcitutils-2.1.9-r1
-DEPEND="virtual/glibc
- >=sys-apps/pciutils-2.1.9
- >=sys-apps/usbutils-0.9"
+DEPEND=">=sys-apps/pciutils-2.1.9
+ >=sys-apps/usbutils-0.9"
src_unpack() {
unpack ${A}
cd ${S}/etc/hotplug
- patch -p0 < ${FILESDIR}/${P}-pci.rc-gentoo.diff
- patch -p0 < ${FILESDIR}/${P}-usb.rc-gentoo.diff
- patch -p3 < ${FILESDIR}/${P}-usb.agent-gentoo.diff
- patch -p3 < ${FILESDIR}/${P}-net.agent-gentoo.diff
+ epatch ${WORKDIR}/hotplug-patches/
}
src_install() {
@@ -41,10 +42,10 @@ src_install() {
dodir /etc/hotplug/usb /etc/hotplug/pci
exeinto /etc/init.d
- newexe ${FILESDIR}/hotplug.rc hotplug
+ newexe ${WORKDIR}/hotplug-conf/hotplug.rc hotplug
insinto /etc/conf.d
- newins ${FILESDIR}/usb.conf usb
+ newins ${WORKDIR}/hotplug-conf/usb.conf usb
dodir /var/run/usb
}
diff --git a/sys-apps/hotplug/hotplug-20020401.ebuild b/sys-apps/hotplug/hotplug-20020401.ebuild
deleted file mode 100644
index afee7e72ee21..000000000000
--- a/sys-apps/hotplug/hotplug-20020401.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020401.ebuild,v 1.8 2003/02/13 16:00:56 vapier Exp $
-
-# source maintainers named it hotplug-YYYY_MM_DD instead of hotplug-YYYYMMDD
-MY_P=`echo ${P}|sed 's/-\(....\)\(..\)\(..\)/-\1_\2_\3/'`
-S=${WORKDIR}/${MY_P}
-DESCRIPTION="USB and PCI hotplug scripts"
-SRC_URI="http://unc.dl.sourceforge.net/sourceforge/linux-hotplug/${MY_P}.tar.gz"
-HOMEPAGE="http://linux-hotplug.sourceforge.net"
-KEYWORDS="x86"
-SLOT="0"
-LICENSE="GPL-2"
-
-# hotplug needs pcimodules utility provided by pcitutils-2.1.9-r1
-DEPEND="virtual/glibc
- >=sys-apps/pciutils-2.1.9
- >=sys-apps/usbutils-0.9"
-
-src_unpack() {
- unpack ${A}
-
- cd ${S}/etc/hotplug
- patch -p0 < ${FILESDIR}/${P}-pci.rc-gentoo.diff
- patch -p0 < ${FILESDIR}/${P}-usb.rc-gentoo.diff
-}
-
-src_install() {
- into /
- dosbin sbin/hotplug
- doman *.8
- dodoc README ChangeLog
-
- cd ${S}/etc/hotplug
- insinto /etc/hotplug
- doins blacklist hotplug.functions usb.distmap usb.handmap usb.usermap
- exeinto /etc/hotplug
- doexe *.agent *.rc
- dodir /etc/hotplug/usb /etc/hotplug/pci
-
- exeinto /etc/init.d
- newexe ${FILESDIR}/hotplug.rc hotplug
-
- insinto /etc/conf.d
- newins ${FILESDIR}/usb.conf usb
-}
-
-pkg_postinst() {
- ewarn "WARNING: The fxload program was spliced off this package"
- ewarn "WARNING: emerge fxload if you need it"
-}
diff --git a/sys-apps/hotplug/hotplug-20020826.ebuild b/sys-apps/hotplug/hotplug-20020826.ebuild
index f6cbd18a1d4e..e419081fd013 100644
--- a/sys-apps/hotplug/hotplug-20020826.ebuild
+++ b/sys-apps/hotplug/hotplug-20020826.ebuild
@@ -1,30 +1,31 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020826.ebuild,v 1.3 2003/02/13 16:01:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hotplug/hotplug-20020826.ebuild,v 1.4 2003/03/11 07:38:06 seemant Exp $
+
+inherit eutils
# source maintainers named it hotplug-YYYY_MM_DD instead of hotplug-YYYYMMDD
-MY_P=`echo ${P}|sed 's/-\(....\)\(..\)\(..\)/-\1_\2_\3/'`
+MY_P=${PN}-${PV:0:4}_${PV:4:2}_${PV:6:2}
S=${WORKDIR}/${MY_P}
DESCRIPTION="USB and PCI hotplug scripts"
-SRC_URI="http://unc.dl.sourceforge.net/sourceforge/linux-hotplug/${MY_P}.tar.gz"
HOMEPAGE="http://linux-hotplug.sourceforge.net"
-KEYWORDS="~x86 ~ppc"
+SRC_URI="mirror://sourceforge/linux-hotplug/${MY_P}.tar.gz
+ mirror://gentoo/${PN}-gentoo-conf.tar.bz2
+ mirror://gentoo/${P}-gentoo-patches.tar.bz2"
+
SLOT="0"
LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc"
# hotplug needs pcimodules utility provided by pcitutils-2.1.9-r1
-DEPEND="virtual/glibc
- >=sys-apps/pciutils-2.1.9
- >=sys-apps/usbutils-0.9"
+DEPEND=">=sys-apps/pciutils-2.1.9
+ >=sys-apps/usbutils-0.9"
src_unpack() {
unpack ${A}
cd ${S}/etc/hotplug
- patch -p0 < ${FILESDIR}/${P}-pci.rc-gentoo.diff
- patch -p0 < ${FILESDIR}/${P}-usb.rc-gentoo.diff
- patch -p3 < ${FILESDIR}/${P}-usb.agent-gentoo.diff
- patch -p3 < ${FILESDIR}/${P}-net.agent-gentoo.diff
+ epatch ${WORKDIR}/hotplug-patches/
}
src_install() {
@@ -41,10 +42,10 @@ src_install() {
dodir /etc/hotplug/usb /etc/hotplug/pci
exeinto /etc/init.d
- newexe ${FILESDIR}/hotplug.rc hotplug
+ newexe ${WORKDIR}/hotplug-conf/hotplug.rc hotplug
insinto /etc/conf.d
- newins ${FILESDIR}/usb.conf usb
+ newins ${WORKDIR}/hotplug-conf/usb.conf usb
}
pkg_postinst() {