raven ioctl

Unix miscellanea.

ioctl.org : unix bits and pieces

Unix bits and pieces

Migration to cyrus and exim

To come: complete details of migrating our mail service from SMS and sendmail to cyrus and exim.

For now: an outline of the Exim configuration scheme for general reference.

Pine patches: a couple of fixes against version 4.21. The first is to fix some date formatting code to be RFC compliant. The second is to enable Pine to be slightly useful when used against Cyrus (folder detection) as opposed to UW-imapd.

Pine is also compiled to use /usr/local/pine/etc/pine.conf and /usr/local/pine/etc/pine.conf.fixed as its configration files.

Procmail patch: to stop it creating /var/mail/user

Shell scripts

A small startup script that provides per-user startup scripts a-la the SysV-style /etc/rc?.d. Should be run right at the end of system start-up; trusted users only.

Locating processes that have open unlinked files: openfiles. This version is for FreeBSD and uses fstat, but the principle should transfer to sufficiently clever versions of fuser. Basically, for those folks who ask the "why aren't du and df agreeing" question (who don't have lsof) on FreeBSD-questions.

Apache error-log tracking

I got sick of Apache hiding its error logs all over the place; restarting Apache using apachectl and this script lets you spot annoying configuration problems that might be hidden away in /usr/local/you/will/never/find/this/logfile_log. Apologies in advance - it's not an example of great Perl - I wrote it with cat.

Sample usage:

# ./aet -b /usr/local/apache -W

You'll be presented with a list of all the current logfiles together with their sizes. In a separate session, restart Apache. Then hit Return and aet will show you what lines have appeared on the end of the various logfiles. This enables you to spot configuration errors quickly. aet will continue to do this until you exit it by typing q.

Over the years aet has grown the ability to spot other niggling apache configuration problems that the httpd itself won't necessarily carp about in a particularly helpful manner. It can save large amounts of troubleshooting time either on its own, or as the basis for your own sanity-checking scripts. Some of this functionality is duplicated by testing invocations to httpd; nevertheless, putting these warnings together in one utility has proved useful.

Apache log rotation

An oldie but, well, still an oldie. We had some long-lived httpd processes that were losing the last lines of their logfiles when we compressed them. Rather than waiting "probably long enough", we use something a little like this: logrotate, which you configure with a logrotate.conf file as demonstrated.


Some short, to-the-point documentation and how-tos for setting up CVS for use with ssh. Including patches to get cvs server understanding the --allow-root option.


Some older notes aimed at local users.

A quick description of two strategies for implementing load-balancing with CAS.

Debian, USB memory stick, SYSLINUX, Windows XP

I recently had what I would describe as a minor headache getting SYSLINUX to work against a USB memory stick on Windows XP. I have outlined the workaround I used to make this work, given the constraints of the situation.

Although the writeup is not yet complete, I've also got a document that details a bare-metal recovery strategy for Debian (although it's applicable to other Linux distributions) that utilises a network-based dump / restore and a recovery system built from first principles on a bootable USB key: details of syslinux, initrd and qemu within.

Also, I have some notes on installing Debian amd64 on a Sun Fire X4100 or X4200, without using the external IDE drive in Dol's scheme.