#3307: GPM Init Script Does Not Use GPMOPTS Correctly
-------------------------+--------------------------------------------------
Reporter: mnooner256 | Owner: blfs-book@…
Type: task | Status: new
Priority: normal | Milestone: current
Component: Bootscripts | Version: SVN
Severity: normal | Keywords: GPM, Bootscripts
-------------------------+--------------------------------------------------
The boot script improperly quotes $GPMOPTS when passing it to the gpm
program. This has the effect of sending several options to the program as
one string. To reproduce this error:
1. The example below uses an option to switch the middle button's
functionality with right mouse button (useful with touch pads) by editing
/etc/sysconfig/mouse file to this:
{{{
# Begin /etc/sysconfig/mouse
MDEVICE="/dev/input/mice"
PROTOCOL="imps2"
GPMOPTS="-B 132"
# End /etc/sysconfig/mouse
}}}
2. Now try restarting the gpm service you will see it fails.
If you examine line 43 of /etc/init.d/gpm you will see that $GPMOPTS is
quoted when it should not be. To fix this you can use this sed script to
strip the quotes:
{{{
$ sed -i 's/"\(${GPMOPTS}\)"/\1/g' /etc/init.d/gpm
}}}
Note this fix works even if $GPMOPTS is an empty string (like the examples
shown in the book).
--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/3307>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page