Main page | Install | ttyreplay(1) | rpldev(4) | rpl(5) | ttyrpld(7) | rplctl(8) | rpld(8) | Netlogging | Support


Unpacking >

In the following code snippets, # denotes a root/superuser shell, while $ can be a user, or a root shell. Listed are only the commands you have to execute, their output is not shown in the boxes.

If you made it until here, I assume you already unpackaged the source tarball. If not, use:

$ tar -xvjf ttyrpld-VERSION.tbz2;

Of course, replace version with the correct string. Non-GNU users might need some additional steps or different ways to unpack tar-bzip2 archives.

 
Patching the Kernel sources (Linux) >

This is probably the step most of us will hate, because it involves a recompile of the Kernel, or at least bzImage. However, I can't help this, as this is necessary. Once you have it prepared with the rpldev hooks, you will never need to do so again, until either you get a new Kernel tree or if the kpatches change. That way, you can upgrade ttyrpld, yes even rpldev(!) without a reboot.

You can find different Kernel patches in the kpatch folder, each targeting a different series and/or version.

$ cd /usr/src/linux-2.6.9/;
$ patch -p1 -i /usr/src/ttyrpld/kpatch/linux-2.6.9.diff;
$ make menuconfig;

Run `make menuconfig` or anything else that suits your needs to choose "TTY logging via rpldev" in the "Security options" menu.

Note: For Linux Kernels 2.4.x and older, the "TTY logging via rpldev" option is available in the "Character devices" menu.

 
Patching the Kernel sources (FreeBSD) >

The procedure is similar to the one needed for the Linux Kernel. The kpatch for FreeBSD is a little bigger than the one for Linux, since it has to add a close-per-fd method and corresponding hooks for these. As such, not all tty devices might be supported under FreeBSD.

$ cd /usr/src/sys/;
$ patch -p1 -i /usr/src/ttyrpld/kpatch/freebsd-5.3.diff;

... and do whatever is necessary to rebuild and run the new kernel image. (That does not mean I do not how to do that, but everyone has his own strategy in building a Kernel under BSD.) No option needs to be enabled in conf.

 
Compiling the Kernel module >

After having booted the new Kernel, run make kmod in the root of the source directory. (Please note that you will need GNU make, version 3.80 or later, as well as GNU gettext/msgfmt and GNU install) It will try to compile, load and install the module.

You can tune the location of the Kernel sources and module installation path by using KERNEL_DIR=xxx and/or MODULES_DIR=xxx, respectively.

BSD users have to use gmake; KERNEL_DIR and MODULES_DIR is not applicable for BSD, but you may cd into freebsd-5.3 by hand and run (bsd) make with any options you need.

To load the module at boot time, edit your distribution specific startup scripts. A hint for SUSE users: it is in /etc/sysconfig/kernel. If you do not know where, ask someone who knows or simply put a `modprobe rpldev` into /etc/init.d/boot.local. However, the supplied etc-init.d-rpld script (to be put as /etc/init.d/rpld) (for Linux/LSB) will be so kind to automatically load it.

There is currently no start script for rpld for BSD.

 
Compiling the user-space applications >

To compile the user-space tools, run make without any arguments. This will build rpld and ttyreplay (the daemon and the log analyzer).

You will need libHX to use ttyrpld since it makes use of advanced data storage and string functions not present in libc.

You also need popt (and popt-devel), a library for option parsing. It is usually distributed alongside Redhat's Package Manager "RPM". If you distro does not use RPM, you might still find it in a separate package. If in doubt, get the rpm sources (rpm-4.1.tar.bz2 or similar) from Redhat and compile popt from there.

 
Installing >

A `make install` target is provided and will install rpld and rplctl in /usr/local/sbin/, ttyreplay goes into /usr/local/bin/. You can of course put the programs in another place, but might need to adjust /etc/init.d/rpld then.

Translations are put into /usr/local/share/locale/. The configuration file rpld.conf will be copied to /etc/ only if it does not exist yet.

Copying etc-init.d-rpld to /etc/init.d/rpld alone does not make it start on bootup. Refer to your Linux distribution's guide on how to include /etc/init.d/rpld in your boot process. For SUSE, the command is insserv /etc/init.d/rpld.

 
Device node >

You normally do not to create a device node, since rpld will open /proc/misc to see at which minor number the module has been registered and dynamically creates a node in the current directory (which is deleted shortly afterwards).

This is just because most Linux distros do not work well with udev ATM. Under BSD, /dev/rpl is created upon kldload and should not pose any problem.

 

by Jan Engelhardt *