Holger's Blog A good shell is the best user interface.

19Jan/120

“bestfit” is back

I recently recycled an old script I wrote several years ago to automatically generate an ISO image from selected subfolders. The idea is, that these folders are written to an archive CD/DVD if the total capacity passes the media's limit.
The script callsĀ bestfit (release 0.2.0 by Oskar Liljeblad) and that tool was no longer installed on my current workstation. But now it's back...

Please visit http://nerdbynature.de/bits/bestfit/ for a 32 Bit Debian package or an archive of the sources (tar.gz).
I used the sources to build an AMD64 package just by a call to

fakeroot debian/rules binary

within the source folder.

Usage of bestfit was simple in my case:

bestfit --quiet --invert --space="$((700*1024*1024/2048))" candidates/*

That will give me a list of folders I have to move away from the parent folder candidates, so the remaining folders will fit perfectly on the 700MBs of a Data CD.

9Sep/110

Lenny to Squeeze

Today it was time for another upgrade of a LAMP node from Debian Lenny to Squeeze.

The Dist Upgrade was quite flawless, but I later recognized that neither MySQL nor ProFTPD was correctly updated. I had to upgrade both servers manually using apt-get install mysql-server proftpd.

And once again PHP 5.3 broke several some applications including the breadcrumb extension of MediaWiki and another one using a goto function (that's now an operator).

So it' s two-fold. On the one hand a decent developer would appreciate a PHP 5.3, on the other hand, it still breaks PHP 5.2 applications using deprecated functions or ... goto.

The switch to dash for all init scripts did no good to a Tomcat init script, but splitting the export command to a separate line and application of bash instead of sh on the catalina script fixed it.

31Jan/112

Debian 6.0 Squeeze

Release is only a few days away. I am pretty sure, you can already choose Squeeze for production, it's Debian after all.

23Jul/091

Nagios Check for Security Fixes

If you are tired of scanning all kind of CERT advisories in your mailbox and you are running a nice Debian-based landscape using mostly package-based software anyway, you should consider using check_apt contained in the Nagios plugins.

You just need to run check_apt, that will check for available updates and is turning into CRITICAL, if security updates are available. For Debian and Ubuntu the default pattern for security-related updates will do fine.
It's a good idea to setup a cron job, that will update the package database like this:
30 */12 * * * root /usr/bin/apt-get -qq update
You can also let check_apt do this, but normally it will run with non-privileged permissions (using NRPE or SNMP-exec), which is not compatible with the requirements of the update on the package database. The check itself is doing a fake upgrade, which is allowed for non-privileged users.
Of course you can also use sudo to solve this minor issue.
By the way, my APT services on Debian-based hosts are normally setup with a lower frequency (normal_check_interval, retry_check_interval, notification_interval). It should work as a useful notification during daylight, but I don't want to wake-up in the middle of the night triggered by a check_apt.