--- Begin Message ---
On Wed, Apr 27, 2011 at 03:24:07PM +0200, Harald Dunkel wrote:
> Trying to configure several servers over network I noticed that
> "dpkg-reconfigure keyboard-configuration" silently dies, if no keyboard
> is attached to the PC.
I suppose you don't mean that dpkg-reconfigure dies (i.e. exits with
error) but that it simply exits without asking any questions. This is
the intended behaviour - there is no point to configure a keyboard if
there is no keyboard.
> Thats pretty painful, because the servers are supposed to be connected
> to a KVM only in case of an emergency.
If you use a passive KVM switch, then yes - only one computer will see the
attached keyboard&mouse. It is normal for this configuration to cause
problems when the computer performs hardware detection, for example
Windows machines will boot in mouse-less mode. In the case of
keyboard-configuration the problem is not severe - dpkg-reconfigure will
preserve the current configuration and the console configuration boot
scripts will work normally.
I can suggest four solutions for your problem:
1. Buy an active KVM switch. With an active KVM switch all computers
will see a keyboard.
2. Do not reconfigure remotely the keyboard. It is safer when a local
operator does this because it is possible to test that the keyboard
configuration works as intended.
3. Edit /etc/default/keyboard by hand. You can use scp to copy the same
file between the machines. This a lot easier than running
dpkg-reconfigure on each machine.
4. Run dpkg-reconfigure on the computer that currently sees the keyboard
from the KVM switch and then copy its /etc/default/keyboard to the other
machines. If you want to test remotely whether a computer has attached
PS/2 keyboard, you can use the following command:
ls /dev/input/by-path/platform-*-event-kbd
Anton Zinoviev
--- End Message ---