TTY replay daemon

   
Unpacking >

If you made it until here, I assume you already unpackaged the source tarball. If not, use tar -jxf ttyrpld-version.tbz2.

 
Compiling the Kernel module >

After that, run make kmod in the root of the source directory. (Please note that you will need GNU make, version 3.80 or later.) The kmod target tries to figure out the current Kernel version and builds the Kernel module. If a wrong Kernel version is reported (for whatever reason), you can also run make from within the kernel-2.6 (or kernel-2.4) subdirectory.

Be sure to have /lib/modules/`uname -r`/build point to a valid and proper Linux Kernel source tree.

After successful compilation, try to load the module by using `insmod` on kernel-2.6/rpldev.ko (or kernel-2.4/rpldev.o). If it loads fine, you can copy the file to /lib/modules/`uname -r`/misc/.

Summary of (default) procedure

# make kmod;
# insmod kernel-2.6/rpldev.ko;
# cp kernel-2.6/rpldev.ko /lib/modules/2.6.4/misc/;

 
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 these, because of their (efficient) internal data structures (i.e. tty-to-fd mapping in rpld).

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. (SuSE (uses RPM): popt-1.7-176.3.i586.rpm for example.)

 
Installing >

A `make install` target is currently not provided as different system administrators might want to install it in different places. Some even might want to consider to run ttyrpld in a chroot'ed environment. (Running chroot'ed is possible, but I do not see it useful, as ttyrpld is not touched by standard users in any way.)

The standard position I use is in /usr/lib/ttyrpld. You can directly move the whole source code tree there; it would not make sense to create such a folder just for two executables.

Example on how this could be done:

# cd /usr/lib/;
# tar -xjf ttyrpld-version.tbz2;
# ln -fs ttyrpld-version ttyrpld;