Dan Nicholson wrote: > On 8/13/06, Christoph Feikes <[EMAIL PROTECTED]> 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. I think the "" should remain around MDEVICE and PROTOCOL because they are meant to be single arguments. But GPMOPTS doesn't have to be a single argument.
Lets say GPMOPTS = "-a -b". With the "" the command would be gpm "-a -b" but without the "" the command would be gpm -a -b. There's a big difference there. "-a -b" is one argument. -a -b is 2 arguments. -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page