Unix: setting a trap in bash
To define a trap that will kill arbitrary processes. For example, you create a "cat" process that runs in the background and when you press Control-C (SIGINT), you want that cat process to be killed.
Place the following at the top of the script.
trap 'cleanup' EXIT
cleanup () {
killall cat
echo killall cat
}
Linux: upgrading to Redhat Linux 9 from RL 7.3 or 8 using apt-get
...To update via apt-get, first change "8.0" to "9" in /etc/apt/sources.list. Next, make sure you are not logged in via the GUI, but rather logged out and using just the command-line login. ... Then, continue with these commands as root:
# apt-get update
# apt-get install rpm apt openssl096b openssl rpm-python
If it asks you to type "Yes, do as I say!" please enter in that phrase. Continue with:
# apt-get install coreutils
# apt-get upgrade
# apt-get install kernel-pcmcia-cs#1:3.1.31-13 kernel#2.4.20-18.9 sulinux-aptconfig
# apt-get dist-upgrade
(consider rebooting/testing with new kernel here)
# apt-get remove kernel#2.4.18-27.8.0
src:
http://sulinux.stanford.edu/install-9.html
Linux: Grub and serial console
Stuff in /boot/grub/menu.lst:
serial --unit=0 --speed=9600
terminal --timeout=10 serial console
console=tty0 console=ttyS0,9600
Stuff in /etc/inittab
s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux
src:
http://www.znark.com/tech/serialconsole.html