Skip to contentSkip to conversation

2004-01-05 release of hotplug scripts

ANNOUNCE Greg KH 6 participants 14 messages Jan 5, 2004 – Mar 29, 2004

lore
Share & tools
lore

Greg KH

author
#0 lore raw

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id679

Or from your favorite kernel.org mirror at:

	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_01_05.tar.gz
or for those who like bz2 packages:
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_01_05.tar.bz2

I've also packaged up some pre-built (and signed) Red Hat FC 1 based rpms:

	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_01_05-1.noarch.rpm
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-base-2004_01_05-1.noarch.rpm

The source rpm is available if you want to rebuild it for other distros or versions of Red Hat at:

	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_01_05-1.src.rpm
	kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_01_05-1.src.rpm

The main web site for the linux-hotplug project can be found at:
http://linux-hotplug.sf.net/
which contains lots of documentation on the whole linux-hotplug process.

This release is recommended for _anyone_ using the 2.6.0 and beyond kernels who is still using hotplug scripts older than 2003_08_05, as a number of changes have been made in order to support the 2.6 kernel properly.

The release is still backwards compatible with 2.4, so there is no need to worry about upgrading.

The full ChangeLog extract since the last release is included below for those who want to know everything that's been changed, and who to blame for them :)

thanks,

greg k-h

--------------

Mon Jan 5 2004 kroah
- 2004_01_05 release

Mon Oct 13 2003 kroah
- sysfs entries for usb devices are in hex. Patch from Andrey Borzenkov <[email protected]>
- add input.rc and input.agent for input systems. Patch from Andrey Borzenkov <[email protected]>

Tue Oct 7 2003 kroah
- keep already loaded modules from causing messages in the syslog.
- added firmware.agent file from Marcel Holtmann <[email protected]>
- Lots of patches from Bill Nottingham <[email protected]> to try to sync back up with the Red Hat hotplug package:
- hotplug-2003_08_05-networkdown.patch
Don't bring up network devices if the network service isn't started.
- hotplug-2002_04_01-joydev.patch
Some extra joystick devices.
- hotplug-2003_08_05-tunnel.patch
Exclude tunl*/tun*/tap* from being brought up via hotplug events
- hotplug-2002_04_01-wacom.patch
Some wacom tablets for evdev.
- hotplug-2002_04_01-usblcd.patch
usblcd mappings
- hotplug-2002_04_01-inhotplug.patch
Set IN_HOTPLUG environment variable as something users can check in case they don't want some interface to be automatically brought up.
- hotplug-2003_08_05-updfstab.patch
Run updfstab on usb-storage insertion, and general removal (Probably needs to run on firewire, and other sorts of removal devices). upfstab is a Red Hat specific program that edits /etc/fstab to add entries for removable devices.
- added dasd (s390 stuff) tape and dasd agent files from SuSE and Red Hat's hotplug package.

Wed Sep 24 2003 kroah
- fixed status display of usb drivers in the 2.6 kernel as /proc/bus/usb/drivers is no longer present.
- fixed typo in the /sbin/hotplug comments as found by [email protected]

Tue Sep 16 2003 kroah
- remove devlabel calls, it should just put its own link in /etc/hotplug.d

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 4 lines · Greg KH

This release is recommended for _anyone_ using the 2.6.0 and beyond kernels who is still using hotplug scripts older than 2003_08_05, as a number of changes have been made in order to support the 2.6 kernel properly.

This patch makes things work better on my laptop running linux 2.6.1-rc1. Most likely it can be done in a better way.

Index: etc/hotplug/hotplug.functions
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v retrieving revision 1.22

hotplug/hotplug.functions +1 -1
diff -u -r1.22 hotplug.functions
@@ -139,7 +139,7 @@
     do
 	# maybe driver modules need loading
         LOADED=false
-	if ! lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
+	if ! lsmod | grep -q "^${MODULE//-/_} " > /dev/null 2>&1; then
 	    if grep -q "^$MODULE\$" $HOTPLUG_DIR/blacklist \
 		    >/dev/null 2>&1; then
 		debug_mesg "... blacklisted module:  $MODULE"

Index: etc/hotplug/pci.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/pci.agent,v retrieving revision 1.13

hotplug/pci.agent +1 -1
diff -u -r1.13 pci.agent
@@ -147,7 +147,7 @@
 add)
     pci_convert_vars
 
-    LABEL="PCI slot $PCI_SLOT_NAME"
+    LABEL="PCI slot $PCI_SLOT"
 
     # on 2.4 systems, modutils maintains MAP_CURRENT
     if [ -r $MAP_CURRENT ]; then

Index: etc/hotplug/pci.rc
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/pci.rc,v retrieving revision 1.7

hotplug/pci.rc +25 -7
diff -u -r1.7 pci.rc
@@ -25,6 +25,11 @@
 #     . /etc/sysconfig/pci
 # fi
 
+sys_file ()
+{
+    cut -f2 -dx $DEVICE/$1
+}
+
 pci_boot_events ()
 {
     #
@@ -46,14 +51,27 @@
     PCI_SUBSYS_ID=0:0
     export ACTION PCI_CLASS PCI_ID PCI_SLOT PCI_SUBSYS_ID
 
-    # 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
+    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
-    done
+	;;
+    esac
 }
 
 # See how we were called.
Signature · 3 lines
-- 
Måns Rullgård
[email protected]
#2 lore raw
In reply to Greg KH
Quoted 1 line · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release,

What about my cleanup patches?

Signature · 13 lines
ciao, |
Marco | [3931 inHKpKwK3RQ7g]


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#3 lore raw
In reply to Greg KH

Hi Greg KH,

Quoted 3 lines · On Mon, 5 Jan 2004 10:30:58 -0800 Greg KH <[email protected]> wrote:

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id=17679

Thanx for this new release!

Did you see my (ridiculously small) patch submission? I never got even a reply ;-), maybe you found it unrelevant?

It was:

	Date: Sun, 23 Nov 2003 00:34:27 +0100
	Subject: patch proposal: verbosity

Applied upon my SuSE 8.x, it provides (IMO) more logical verbosity. Patch is attached to this message, in case.

Regards,

Signature · 1 line
wwp
hotplug.functions renamed from hotplug.functions.orig +3 -0
@@ -158,6 +158,9 @@
 		# (ioctls etc) not in setup scripts or modules.conf
 		LOADED=true
 	    fi
+	else
+		debug_mesg "... already loaded module:  $MODULE"
+		LOADED=true
 	fi
 
 	# always run setup scripts after any matching kernel code has had
#4 lore raw
In reply to Greg KH
Quoted 4 lines · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id=17679

Seems there is an issue with hotplug.functions .. attached correct patch?

Thanks,

Signature · 1 line
Martin Schlemmer
etc/hotplug/hotplug.functions +0 -3
@@ -154,9 +154,6 @@
 		# (ioctls etc) not in setup scripts or modules.conf
 		LOADED=true
 	    fi
-	else
-	    # This module is already loaded
-	    LOADED=true
 	fi
 
 	# always run setup scripts after any matching kernel code has had
#5 lore raw
Quoted 8 lines · Martin Schlemmer
Quoted 4 lines · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id=17679

Seems there is an issue with hotplug.functions .. attached correct patch?

Err, do not worry - seemed like I missed an patch we had for this (was not in same section of the build file).

Sorry,

Signature · 1 line
Martin Schlemmer
author
#7 lore raw
In reply to Greg KH
Quoted 4 lines · Marco d'Itri
Quoted 1 line · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release,

What about my cleanup patches?

The "don't rely on bash" patches? I've left them up to Dave to apply or not, as I don't have a good enough grasp of shell programming to make a wise call on them.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#8 lore raw
In reply to Greg KH
Quoted 14 lines · wwp

Hi Greg KH,

Quoted 3 lines · On Mon, 5 Jan 2004 10:30:58 -0800 Greg KH <[email protected]> wrote:

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id679

Thanx for this new release!

Did you see my (ridiculously small) patch submission? I never got even a reply ;-), maybe you found it unrelevant?

Quoted 6 lines

It was:

	Date: Sun, 23 Nov 2003 00:34:27 +0100
	Subject: patch proposal: verbosity

Applied upon my SuSE 8.x, it provides (IMO) more logical verbosity. Patch is attached to this message, in case.

But this patch doesn't apply to the latest release, does it?

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#9 lore raw
In reply to Greg KH
Quoted 4 lines

The "don't rely on bash" patches? I've left them up to Dave to apply or not, as I don't have a good enough grasp of shell programming to make a wise call on them.

In general I'm in favor of them.

Please resend patches like that (and SuSE-friendly ones too) against this latest release, to make sure they get to the top of my backlog of hotplug patches ... else I may miss them.

- Dave

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#10 lore raw
In reply to Greg KH
Quoted 4 lines · Greg KH

This release is recommended for _anyone_ using the 2.6.0 and beyond kernels who is still using hotplug scripts older than 2003_08_05, as a number of changes have been made in order to support the 2.6 kernel properly.

This patch makes things work better on my laptop running linux 2.6.1-rc1. Most likely it can be done in a better way.

Index: etc/hotplug/hotplug.functions
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/hotplug.functions,v retrieving revision 1.22

hotplug/hotplug.functions +1 -1
diff -u -r1.22 hotplug.functions
@@ -139,7 +139,7 @@
     do
 	# maybe driver modules need loading
         LOADED=false
-	if ! lsmod | grep -q "^$MODULE " > /dev/null 2>&1; then
+	if ! lsmod | grep -q "^${MODULE//-/_} " > /dev/null 2>&1; then
 	    if grep -q "^$MODULE\$" $HOTPLUG_DIR/blacklist \
 		    >/dev/null 2>&1; then
 		debug_mesg "... blacklisted module:  $MODULE"

Index: etc/hotplug/pci.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/pci.agent,v retrieving revision 1.13

hotplug/pci.agent +1 -1
diff -u -r1.13 pci.agent
@@ -147,7 +147,7 @@
 add)
     pci_convert_vars
 
-    LABEL="PCI slot $PCI_SLOT_NAME"
+    LABEL="PCI slot $PCI_SLOT"
 
     # on 2.4 systems, modutils maintains MAP_CURRENT
     if [ -r $MAP_CURRENT ]; then

Index: etc/hotplug/pci.rc
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/pci.rc,v retrieving revision 1.7

hotplug/pci.rc +25 -7
diff -u -r1.7 pci.rc
@@ -25,6 +25,11 @@
 #     . /etc/sysconfig/pci
 # fi
 
+sys_file ()
+{
+    cut -f2 -dx $DEVICE/$1
+}
+
 pci_boot_events ()
 {
     #
@@ -46,14 +51,27 @@
     PCI_SUBSYS_ID=0:0
     export ACTION PCI_CLASS PCI_ID PCI_SLOT PCI_SUBSYS_ID
 
-    # 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
+    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
-    done
+	;;
+    esac
 }
 
 # See how we were called.
Signature · 3 lines
-- 
Måns Rullgård
[email protected]
#11 lore raw
In reply to Greg KH
Quoted 2 lines · Martin Schlemmer

Seems there is an issue with hotplug.functions .. attached correct patch?

It's not correct. It's got ^M line ends.

Signature · 21 lines
Måns Rullgård
[email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&opÌk
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#12 lore raw
In reply to Greg KH
Quoted 4 lines · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id=17679

Seems there is an issue with hotplug.functions .. attached correct patch?

Thanks,

Signature · 1 line
Martin Schlemmer
etc/hotplug/hotplug.functions +0 -3
@@ -154,9 +154,6 @@
 		# (ioctls etc) not in setup scripts or modules.conf
 		LOADED=true
 	    fi
-	else
-	    # This module is already loaded
-	    LOADED=true
 	fi
 
 	# always run setup scripts after any matching kernel code has had
#13 lore raw
In reply to Greg KH
Quoted 8 lines · Martin Schlemmer
Quoted 4 lines · Greg KH

I've just packaged up the latest Linux hotplug scripts into a release, which can be found at:
http://sourceforge.net/project/showfiles.php?group_id=17679

Seems there is an issue with hotplug.functions .. attached correct patch?

Err, do not worry - seemed like I missed an patch we had for this (was not in same section of the build file).

Sorry,

Signature · 1 line
Martin Schlemmer