Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#3307 closed task (fixed)

GPM Init Script Does Not Use GPMOPTS Correctly

Reported by: Michael Nooner Owned by: bdubbs@…
Priority: normal Milestone:
Component: Bootscripts Version: SVN
Severity: normal Keywords: GPM, Bootscripts
Cc:

Description

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

Change History (3)

comment:1 by bdubbs@…, 13 years ago

Owner: changed from blfs-book@… to bdubbs@…
Status: newassigned

You are right. I'll delete the quotes at the next update.

comment:2 by bdubbs@…, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed at in revision 9745.

comment:3 by bdubbs@…, 11 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.