#3307 closed task (fixed)
GPM Init Script Does Not Use GPMOPTS Correctly
Reported by: | Michael Nooner | Owned by: | |
---|---|---|---|
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:
- 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
- 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 , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed at in revision 9745.
Note:
See TracTickets
for help on using tickets.
You are right. I'll delete the quotes at the next update.