I'm using a copy of tomsrtbt version 1.7.118, and since I operate in the UK, I
have the teency nagging problem
that I have to select the UK keyboard "21" at boot during the execution of
rc.custom, to override the default US
keyboard layout.

Looking at the code, I find in rc.custom:

.......

echo P>P
sh<<'X'&
read -p "
1 be    4 dk    7 fr    10 is   13 la   16 pt   19 sf
2 cf    5 es    8 gr    11 it   14 no   17 ru   20 sg
3 de    6 fi    9 hu    12 jp   15 pl   18 se   21 uk

Select keyboard, ENTER for default (15 seconds): " J</dev/tty1>/dev/tty1
[ "$J" ]&&loadkeys $J.map
rm P
X
(sleep 15;kill $!;rm P)2>$NU&
while [ -f P ];do;done

.......

Is it reasonable to just add a line:

KB=21

to settings.s

and change the above snippet to read:

.......

echo P>P
[ "$KB" ] && J=$KB       <<<<< additional line
sh<<'X'&
read -p "
1 be    4 dk    7 fr    10 is   13 la   16 pt   19 sf
2 cf    5 es    8 gr    11 it   14 no   17 ru   20 sg
3 de    6 fi    9 hu    12 jp   15 pl   18 se   21 uk

Select keyboard, ENTER for default (15 seconds): " J</dev/tty1>/dev/tty1
[ "$J" ]&&loadkeys $J.map
rm P
X
(sleep 15;kill $!;rm P)2>$NU&
while [ -f P ];do;done

.......

so that a site's preferred keyboard setting can be coded in the setting.s file.

Or even, perhaps better:

.......

echo P>P
sh<<'X'&
read -p "
1 be    4 dk    7 fr    10 is   13 la   16 pt   19 sf
2 cf    5 es    8 gr    11 it   14 no   17 ru   20 sg
3 de    6 fi    9 hu    12 jp   15 pl   18 se   21 uk

Select keyboard, ENTER for default (15 seconds): " KB</dev/tty1>/dev/tty1
[ "$KB" ]&&loadkeys $KB.map
rm P
X
(sleep 15;kill $!;rm P)2>$NU&
while [ -f P ];do;done

.......




It's all to do with laziness really. On earlier versions of tomsrtbt ( which
didn't actually support
UK keyboard ) I just let the floppy boot all the way to login. As of now, I tend
 to sit by the machine
as it boots , just so that I can catch it asking for the keyboard setting to
avoid finger confusion later
on. With the above tweak, I'm hoping I can revert to my original practice,
performing some other
useful/menial task on another machine in the foreground whilst waiting for the
floppy to boot in the
background.


Does the coding logic work?


Thanks in anticipation.




Ted Rule,
Flextech Television



Reply via email to