[Helge Kreutzmann]
> If you tell me where I should experiment, I could try out to add a
> delay. I noticed, that sometimes a simple call of "gpm start" is
> enough, so it indeed seems to be a timing issue (but I could not
> detect a pattern, so maybe background activity or somthing like
> this).

This is the hack I'm considering for /etc/init.d/gpm.  If you'd like to
try it and report back, that'd be great.

An alternative solution would be to load the 'mousedev' kernel module
in /etc/modules or /etc/modules-2.6 (if you have the latter).

I don't intend to hack the gpm binary itself, just the init script.
This isn't really gpm's bug, so there are limits in how far I'm willing
to go to work around it. (:

Peter

--- /etc/init.d/gpm     2004-08-25 14:52:41.000000000 -0500
+++ /etc/init.d/gpm     2005-04-04 16:33:22.000000000 -0500
@@ -44,6 +44,13 @@
 
 gpm_start () {
   echo -n "Starting mouse interface server: gpm"
+  # HACK - kernel module init is asynchronous in kernel 2.6, EVEN FROM
+  # REQUEST_MODULE().  That would include 'mousedev'.  Bleh.  Messing
+  # with hotplug scripts is way too much trouble, though, hence this.
+  for foo in 1 2 3; do
+    if :< ${device-/dev/mouse}; then break; fi
+    sleep 1
+  done
   eval start-stop-daemon --start --quiet --nicelevel $niceness --exec $GPM \
     -- $cmdln || { echo " start failed."; return 1; }
   echo "."

Attachment: signature.asc
Description: Digital signature

Reply via email to