A little patch
Hello everyone, I'm trying to set up my usb devices under Linux 2.4.0 but I have not found any documentation so I started downloading packages and doing tests... so i've patched a bit your package... here is the patch All the comments added are in the format # PATCH comment so you can grep them btw I suggest (I can do it if you agree) to make /etc/hotplug dir configurable... I dislike that "cd /etc/hotplug"
diff -r ./hotplug-2001_01_23/etc/hotplug/hotplug.functions ./hotplug-gb/etc/hotplug/hotplug.functions 115a116,126
Quoted 11 lines
# PATCH added function to
list_avail_agents()
{
for AGENT in/etc/hotplug/*.agent; do
# PATCH or should it list also non runnable agents? # PATCH insted of remove scripts, I often chmod a-x them...
if [ -x $AGENT ] ; then
echobasename $AGENT | sed s/.agent//
fi
done
}
diff -r ./hotplug-2001_01_23/sbin/hotplug ./hotplug-gb/sbin/hotplug 24c24,26
< mesg "arguments ($*) env (env)"
---
Quoted 3 lines
# mesg "arguments ($*) env (
env)"mesg "\$* = \"$*\"" mesg "\$1 = \"$1\""
30a33,37
Quoted 5 lines
# PATCH $# don't behave well...
# PATCH and [ -o ] is a false friend for bash programmers :)) if [[ ( "$*" == "" ) || ( $1 == help ) || ( $1 == '--help' ) ]] ; then # PATCH use of "-t" without a fd specified is a bad hack IMHO
32d38
< if [ $# -lt 1 -o $1 = help -o $1 = '--help' ]; then 36a43,45
Quoted 3 lines
# PATCH done...
echo "Installed agents in this box are:"
list_avail_agents
I merged the guts of this into /sbin/hotplug. You noticed a few problems that crept in when things were converted a previous version ... :-)
Didn't change the /etc/hotplug though; that'd sort of defeat the goal of being able to tell end users where to install device setup scripts (/etc/hotplug/usb/visor starting the visor sync daemon, etc).
Thanks for the patch!
- Dave
----- Original Message -----
From: Gioele Barabucci <[email protected]>
To: <[email protected]>
Sent: Friday, January 26, 2001 7:36 AM
Quoted 8 lines
Hello everyone, I'm trying to set up my usb devices under Linux 2.4.0 but I have not found any documentation so I started downloading packages and doing tests... so i've patched a bit your package... here is the patch All the comments added are in the format # PATCH comment so you can grep them btw I suggest (I can do it if you agree) to make
/etc/hotplugdir configurable... I dislike that "cd/etc/hotplug"
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel