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

Dan Nicholson dbn.lists at gmail.com
Tue Oct 10 11:50:32 PDT 2006


On 8/13/06, Christoph Feikes <cfeikes at gmx.net> wrote:
> Hello!
>
> First I like to thank everyone involved for the excellent work on LFS
> and BLFS!
>
> 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 "".

>
> -               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.

--
Dan



More information about the patches mailing list