[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    A little patch
From:       Gioele Barabucci <dev () gioelebarabucci ! com>
Date:       2001-01-26 15:36:03
[Download RAW message or body]

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"


["usb_script_patch" (text/plain)]

diff -r ./hotplug-2001_01_23/etc/hotplug/hotplug.functions ./hotplug-gb/etc/hotplug/hotplug.functions
115a116,126
> # 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
>             echo `basename $AGENT | sed s/.agent//`
>         fi
>     done
> }
diff -r ./hotplug-2001_01_23/sbin/hotplug ./hotplug-gb/sbin/hotplug
24c24,26
<     mesg "arguments ($*) env (`env`)"
---
> #    mesg "arguments ($*) env (`env`)"
>     mesg "\$* = \"$*\""
>     mesg "\$1 = \"$1\""
30a33,37
> 
> # 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
> # PATCH done...
>         echo "Installed agents in this box are:"
>         list_avail_agents

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic