Package: hotkey-setup
Version: 0.1-21
Severity: normal
Tags: patch

Yesterday I noticed that hotkey-setup failed with something like
/dev/input/uinput: no such file or directory
or similar. Re-running the initscript succeeded.

I suspect that device files are not necessarily immediately available
after running modprobe (due to dynamic device file creation by udev).
I changed the initscript to wait until the devices are there, and it
seems to work now.

A "sleep 1" will probably do, but we can do more professional ;-)
Having used a while loop on my laptop, something like this might be
better (because it can never lead to an infinite loop):

--- init.d      2008-01-16 23:08:03.000000000 +0100
+++ init.d.changed      2008-02-03 20:37:29.000000000 +0100
@@ -62,6 +62,11 @@
         if [ ! -c /dev/nvram ]; then
             modprobe nvram
         fi
+       for t in 0.1 0.2 0.4 0.8 1.6; do 
+           [ -c /dev/input/uinput ] &&
+           [ -c /dev/nvram ] ||
+           sleep $t
+       done
         $THINKPAD_KEYS $1 && touch $THINKPAD_LOCKFILE
     fi
 }

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to