﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
3307	GPM Init Script Does Not Use GPMOPTS Correctly	Michael Nooner	bdubbs@…	"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)."	task	closed	normal		Bootscripts	SVN	medium	fixed	GPM, Bootscripts	
