[BRLTTY] More questions to help me make a Slint installer blind friendly.
Didier Spaier
didier at slint.fr
Sat Dec 6 12:30:44 EST 2014
Hi there,
So far, I've read this document (very informative, thanks):
http://mielke.cc/brltty/guidelines.html
I've checked that I have the required devices after execution of the
first (non interactive) startup script /etc/rc.d/rc.S1 (attached).
But this leads to a few more questions:
In /etc/inittab for busybox, attached[1] we currently start only
tty1, tty2 and tty3. (tty4 collects the log messages).
_Should we also start one ore more ttyS<n>, and if yes preferably
with what getty options?
_And what do we have to add in case the braille terminal be connected
through an USB slot, instead of a serial line?
_In the aforementioned document, we are suggested to include these lines
on top of /etc/fstab:
# Start the braille display.
brl::sysinit:/bin/brltty
But instead, can we just start brltty at the end of /etc/rc.S1, as no
interaction with the user occurs during this script's execution?
[1]Don't be fooled by the comments about FbTerm in /etc/fstab. In the
second script executed during startup, /etc/rc.d/start_rc.S2, we start
an FbTerm only under certain conditions, and of course we won't do that
if brltty is included in the command line.
Thanks in advance,
Didier
PS I had a look to a few installers that ship brltty, extracted from
these ISO files:
debian-7.7.0-amd64-netinst.iso
grml64-full_2014.03.iso
lfslivecd-x86-6.3-r2130.iso
but they look overly complicated to my eyes.
I would be grateful for a link to a simpler installer, preferably built
on top of busybox as I'm more familiar with its specific /etc/inittab.
Best regards,
Didier
-------------- next part --------------
# /etc/inittab
# Boot-time system configuration/initialization script.
# This is run first except when booting in single-user mode.
# Initialization is now split in two parts, so that we can use an FbTerm for
# the second (interactive) part: as FbTerm needs to run inside an interactive
# tty, we have to wait until the ttys be created by udev. -- Didier Spaier
::sysinit:/etc/rc.d/rc.S1
tty1::sysinit:/etc/rc.d/start_rc.S2
# Login /bin/sh invocations on selected ttys.
# /bin/sh being run in interactive mode reads /etc/profile that now sets ENV to
# /etc/rc.d/start_FbTerm.sh, that sets the font size then starts an FbTerm. Didier Spaier
tty1::respawn:-/bin/sh
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
# /sbin/getty invocations for selected ttys.
#
#tty1::respawn:/sbin/getty 38400 tty1
#tty2::respawn:/sbin/getty 38400 tty2
# Example of how to put a getty on a serial line (for a terminal)
#
#ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
#ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
#
# Example how to put a getty on a modem line.
#ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
# Reboot when ctrl-alt-del keys are pressed.
::ctrlaltdel:/sbin/reboot
#::ctrlaltdel:/sbin/brc
# Stuff to do before halting or rebooting.
# Hopefully it does these things in order, so that we can fake the
# system date one last time before umounting:
::shutdown:/bin/sh /sbin/fakedate
::shutdown:/sbin/swapoff -a >/dev/null 2>&1
::shutdown:/bin/umount -a -r >/dev/null 2>&1
::shutdown:/sbin/vgchange -an --ignorelockingfailure >/dev/null 2>&1
::shutdown:/bin/sh /sbin/fixdate
-------------- next part --------------
#!/bin/sh
# rc.S: Basic system initialization.
# remove /etc/mtab* so mount creates the /etc/mtab file
/bin/rm -f /etc/mtab* /etc/nologin 1> /dev/null 2> /dev/null
# Mounts /proc:
/bin/mount -av -t nonfs 1> /dev/null 2> /dev/null
/sbin/swapon -a 2> /dev/null
if [ -x /sbin/ldconfig ]; then
/sbin/ldconfig 1> /dev/null 2> /dev/null
fi
# Here's the situation. Because of the practice of keeping the local
# time (rather than UTC) in the system's clock, at any given time half
# of the people doing an install will be creating files that upon
# reboot will appear to have been created in the future.
#
# There are a lot of things that aren't happy when that happens. The
# one that screams the most loudly is e2fsck, and we don't want to
# anger that! Sometimes it even proceeds to check the partitions just
# to be sure the user is fully punished.
#
# But, there's a simple solution. If we set the (temporary) Linux clock
# to yesterday (-24h), then there's no way that could occur. Everything
# on the system will be in the past (but not too far in the past).
# Since files will quickly be put into use and given the correct after
# reboot, this really shouldn't have a negative impact. Plus, it affects
# only newly created files during installation -- any file shipped in a
# package will have an accurate time of creation. (for its timezone ;-)
#
# Update: We have to use 2 days ago, or chroot()+timezone offset might
# still be in the future... <sigh>
#
export TEXTDOMAIN=slackware
. gettext.sh
touch /.today
/bin/sh /sbin/fakedate
## Detect serial console from kernel command line:
#if cat /proc/cmdline | grep console=ttyS 1> /dev/null 2> /dev/null ; then
# SERIAL_CONSOLE="true"
#fi
# Try to mount sysfs:
if cat /proc/filesystems | grep -w sysfs 1> /dev/null 2> /dev/null ; then
mount -t sysfs sysfs /sys 2> /dev/null
fi
# System logger (mostly to eat annoying messages):
/sbin/syslogd 2> /dev/null
sleep 1
/sbin/klogd -c 3 1> /dev/null
# Try to load the loop module:
modprobe loop 1> /dev/null 2> /dev/null
# Run udev:
if ! grep -wq noudev /proc/cmdline ; then
/bin/bash /etc/rc.d/rc.udev start
# Re-assemble RAID volumes:
/sbin/mdadm -E -s > /etc/mdadm.conf
/sbin/mdadm -S -s
/sbin/mdadm -A -s
# This seems to make the kernel see partitions more reliably:
fdisk -l /dev/md* 1> /dev/null 2> /dev/null
else
# Run our old detection routines:
# Look for USB keyboard or storage:
/etc/rc.d/rc.usb start
sleep 3
# Look for IEEE1394 devices:
if grep 1394 /proc/pci 1> /dev/null 2> /dev/null ; then
/etc/rc.d/rc.ieee1394 start
#sleep 3
fi
# Load additional install floppies:
for NEWDISK in 2 ; do
if [ ! -r /etc/disk${NEWDISK} ]; then
while [ 0 ]; do
echo
echo -n "Insert install.${NEWDISK} floppy disk to be loaded into RAM disk and press ENTER"
read readfoo;
if [ "$readfoo" = "Q" -o "$readfoo" = "q" ]; then
break;
fi
echo -n "Loading install.${NEWDISK} floppy into RAM disk... "
( cd / ; cat /dev/fd0 | zcat 2> /dev/null | tar xf - )
if [ -r /etc/disk${NEWDISK} ]; then
echo "done."
echo
break;
else
echo "Error. (reload or enter Q)"
echo
continue;
fi
done
fi
done
### PROBABLY USELESS WITHOUT SOME TIMED DELAY ABOVE
## Start USB again (in case we missed a USB keyboard)
#/etc/rc.d/rc.usb start
# Make detected partitions:
/dev/makedevs.sh
## Not needed with CONFIG_SCSI_MULTI_LUN=y
#unset SCAN
## Now we should rescan the "SCSI" bus to look for new USB or firewire devices
## that look like SCSI devices:
#if [ -r /proc/bus/usb/devices ]; then
# if cat /proc/bus/usb/devices | grep -w usb-storage 1> /dev/null 2> /dev/null ; then
# SCAN="true"
# fi
#fi
#if [ -r /proc/bus/ieee1394/devices ]; then
# if cat /proc/bus/ieee1394/devices | grep -w SBP2 1> /dev/null 2> /dev/null ; then
# SCAN="true"
# fi
#fi
#if [ "$SCAN" = "true" ]; then
# if ! cat /proc/cmdline | grep -q noscanluns 2> /dev/null ; then
# echo "Detected new USB/IEEE1394 storage devices... scanning all LUNs."
# echo "(to skip, give a 'noscanluns' kernel option at boot)"
# #sleep 5
# sh /sbin/rescan-scsi-bus -l
# #sleep 1
# fi
#fi
#unset SCAN
# Re-assemble RAID volumes:
/sbin/mdadm -E -s > /etc/mdadm.conf
/sbin/mdadm -S -s
/sbin/mdadm -A -s
# This seems to make the kernel see partitions more reliably:
fdisk -l /dev/md* 1> /dev/null 2> /dev/null
# Check /proc/partitions again:
/dev/makedevs.sh
# Create LVM nodes:
/dev/devmap_mknod.sh
fi # End Run udev:
if [ -x /etc/rc.d/rc.inet1 ]; then
/bin/sh /etc/rc.d/rc.inet1
fi
# pcmciautils is installing rc.pcmcia as chmod 644, so we'll change that.
# It won't be run at boot time, but it'll make it easy for the pcmcia script
# or to run it from the command line.
chmod 755 /etc/rc.d/rc.pcmcia
# Scan for existing LVM partitions:
# We will run 'vgscan -ay' in the setup to prevent a 10 second sleep;
vgscan --mknodes 2> /tmp/foo
cat /tmp/foo | uniq
rm -f /tmp/foo
# Don't automatically blank the screen, or it will go black during the install
# process when stray keystrokes might be dangerous:
/bin/setterm -blank 0
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
More information about the BRLTTY
mailing list