New Features (from Version 2.00):
0. First installation: Please refer to Installation from Version 1.12.
1. Update from Version 1.12 or higher:
1.1 Unzip archive and compile source-Code:
make tty_control
1.2 Copy programm to /sbin:
cp tty_control /sbin
1.3 Copy the scripts for the control of the CD-Rom and the default commands to /etc/tty_ctrl:
cp etc_tty_ctrl/button?_default /etc/tty_ctrl
cp etc_tty_ctrl/cd_control* /etc/tty_ctrl
1.4 Copy tty_ctrl script to ../init.d (check the path):
cp tty_ctrl /etc/init.d
Installation of the Program (from Version 1.12):
0. Log in as root, unzip Archiv and build hardware
1. Check your path for init.d and modify the makefile, if necessary:
makefile:
INIT_D_PATH:=/etc/init.d
2. Generate Software, paths and links (not for debian):
make install
Generate Software and paths (debian):
make install_deb
Debian: The links have to be made manually.
3. For further processing please refer to item 5 of the installation-instruction
of the versions up to 1.11.
Please note that the path has been changed from /sbin/tty_ctrl to /etc/tty_ctrl
4. Remove Software:
make remove
Installation of the Program (up to Version 1.11):
0. Log in as root, unzip Archiv and build hardware
1. Compile tty_control:
cc -o tty_control tty_control.c
2. Copy tty_control to /sbin :
cp tty_control /sbin
3. Copy script (tty_ctrl refer to Section 7 for details) to path /sbin/init.d :
cp tty_ctrl /sbin
Hint: Normally this path is /etc/init.d. I have used Suse 7.0: They use a different path, so this instruction refers to /sbin/init.d
4. To start the program for the Runlevels 1,2 und 3 automatically:
Change to the directory /sbin/init.d:
cd /sbin/init.d
Create the following links (depends on the runlevels you use):
ln -s ../tty_ctrl rc1.d/S21tty_ctrl
ln -s ../tty_ctrl rc2.d/S21tty_ctrl
ln -s ../tty_ctrl rc3.d/S21tty_ctrl
5. If you recommend to execute own commands, they have to
be located (or linked) in the path /sbin/tty_ctrl.
The follwoing names are mandatory:
button1 for the command to be executed by pressing the 1 button
button2 for the command to be executed by pressing the 2 button
and so on ... up to ..
button7 for the command to be executed by pressing the 7 button
The program recommends a return value, 0 for successful execution. Otherwise you will get an error log.
Hint: Take care of the access rights in this directory. Everything should only
be execute- and readable for root.
The default commands:
Button1 cdrom mount / umount / eject
Button2 mount floppy
Button3 umount floppy
Button4 init 1 (single user)
Button5 init 2 (multi user, network)
Button6 init 0 (shutdown)
Button7 init 6 (reboot)
6. After rebooting your computer everything should work fine.
7. For Information only: The script tty_ctrl (starts the program)
#!/bin/sh
# /sbin/init.d/tty_ctrl
# tty_ctrl: Version 1.11: 2001-06-23
# Runlevel Start Script for tty_control
# starts tty_control on 2. serial line
# check, if your device is also /dev/ttyS1
case "$1" in
start)
# Starting services
startproc /sbin/tty_control /dev/ttyS1 || exit 1
;;
stop)
# Shutting down services
killproc -TERM /sbin/tty_control || exit 1
;;
status)
# Checking for service
checkproc /sbin/tty_control || exit 1
;;
*)
checkproc /sbin/tty_control || startproc /sbin/tty_control /dev/ttyS1
exit 0
esac
exit 0
Deutsche Installations Anweisung
This Page was created by Peter Pfrang. Last modification 2002-01-04.