patch for /etc/rc.d/init.d/gpm from blfs-bootscripts-20060624

Christoph Feikes cfeikes at gmx.net
Tue Oct 10 23:48:58 PDT 2006


Hi Dan!

You wrote:

> On 8/13/06, Christoph Feikes <cfeikes at gmx.net> wrote:
>>
>> I'd like to suggest a little modification of "/etc/rc.d/init.d/gpm" from
>> "blfs-bootscripts-20060624.tar.bz2":
>>
> 
> Thanks for the submission, Christoph. Sorry for the extremely late reply.
> 
>> -if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
>> +if [ -z ${MDEVICE} ] || [ -z ${PROTOCOL} ]
> 
> This needs to stay with the "" for sh compatibility unless either of
> these variables is empty. Bourne sh can't handle [ -z  ], which is
> what would happen without the "".
> 

OK, I reverted that.

>>
>> -               loadproc /usr/sbin/gpm -m "$MDEVICE" -t "$PROTOCOL"
>> "$GPMOPTS"
>> +               loadproc /usr/sbin/gpm -m ${MDEVICE} -t ${PROTOCOL}
>> ${GPMOPTS}
>>                 ;;
>>
>>         stop)
>> --------------->8---------------------->8---------------
>>
>> I replaced the double quotes witch curly braces.  Then you can write eg
>> GPMOPTS="-B 321" in "/etc/sysconfig/mouse" to swap the mouse buttons...
> 
> So, with the "", gpm doesn't handle the multiple arguments correctly?
> I actually don't think the {} are needed, but they can't hurt. Could
> you see what happens if you just have $MDEVICE, etc.
> 

I just tried with

	loadproc /usr/sbin/gpm -m $MDEVICE -t $PROTOCOL $GPMOPTS

and it works fine.

Kind regards, Christoph



More information about the patches mailing list