Sometimes you want to execute a particular command, but only when you’re at home. Examples would be running fetchmail (or fetchnews) through cron, but you don’t want this to run when you’re in the train, connected to the Internet through GPRS…

My idea here would be to create a script (say “athome.sh”) which returns 0 if you’re at home, and 1 otherwise. The key of the script is that the MAC address of your (default) gateway is unique.

#!/bin/sh

GW=$(/sbin/ip route | awk '/default/ {print $3}');
MGW=$(/sbin/arp -e | grep ${GW} | awk '{print $3}');

if [ "${MGW}" = "00:11:22:33:44:55" ]
then
  exit 0;
else
  exit 1;
fi

With this script, you can then run athome.sh && fetchmail. If you aren’t home, athome.sh will return 1 and the fetchmail command will never be executed. When you are, the command returns 0 and fetchmail is launched.

Comments No Comments »

It’s finally committed: I’m going to dive into the realms of database architecture. It’s with some sentiment that I’m leaving the expertise field of Apache, J(2)EE and WebSphere, but seeing the database architecture field makes it up well. I’m starting to get acquainted with Oracle DB as first platform and IBM DB2 + Microsoft SQL Server are pending. Exciting times are coming!

Comments No Comments »

A few people have contacted me if they were allowed to translate the online book I’m writing (Linux Sea). Of course they are, the license allows it. However, I recommend to wait a bit. At this moment, I’m not going to release the docbook sources (I’m not writing it in DocBook, but I’m generating from another XML into DocBook) until I’m happy with the final result.

I’m glad to see that the document is well received. There is still lots of work on it (more excercises, a thorough spelling / grammar check, elaborate on certain topics, …) so stay tuned for further updates. Why are those updates “slow”? Well, let’s say that I use a “fair share scheduling” principle on all my hobbies ;-)

Comments No Comments »

A few updates have made it to the Linux Sea book:

  • Information regarding ndiswrapper
  • Some information about udev and the symlinks that it creates

The PDF version has been updated as well.

Comments No Comments »

If you’re not up to the various free image gallery sites, you might want to try out ZenPhoto. Quite powerful, easy to use and well themeable. Requires PHP / MySQL.

Comments No Comments »

I’ve added quota support information to the Linux Sea book as well as information about the eclean command for cleaning distfiles and packages. The part on building a Linux kernel has been moved into its own chapter, the chapter on hardware support now has a bit more information about dealing with sound cards (ALSA support) and will contain information about sound servers in the near future. This chapter will also be used to configure the various other hardware things as they come by (printers, scanners, …).

Comments No Comments »

I’ve added a draft PDF version of my Linux Sea document. If you don’t mind the A4 papersize and the bad typesetting of the text boxes (I still have lots of overflows to correct) it is quite usable.

Comments 1 Comment »

Having documented a lot in LaTeX (back in the old days at the university), GuideXML (Gentoo’s document markup language) and DocBook (Linux Sea) I’m now pointing my arrows at DITA, the Darwin Information Typing Architecture.

DITA “forces” the technical writer in separating the content of his document in specialized subjects: reference, task or concept, or a specialized version of any of those which you can create/define yourself.

By separating content in those three subjects, you can more easily manage your technical documentation (write concepts as individual topics, tasks as end-user procedures and references for affiliated topics or command information).

Once all these documents are written, you bind them together using a DITA map (a metadocument which holds references to all related concepts/tasks/references) et voila: your documentation is ready.

Well, not really, you need to build it to something end users can read – you can use dita-ot for that. It supports building for Eclipse Infocenter, RTF, XHTML and PDF out of the box.

Comments No Comments »

My everlasting document, Linux Sea, is progressing slowely but surely. I’ve started a few new chapters and also initiated a chapter on Installing Gentoo (which is more a shortlist of tasks with pointers to earlier chapters).

I also took a different CSS (docbook.css file used by the FreeBSD handbook) as it looks a lot better.

Comments 1 Comment »

At work, I am often busy with quite a few projects. Yet, at times, I have no outstanding tasks because all of my tasks can only start when an event has occurred (like a server which is made available, or a budget that is approved) or another task has finished.

To keep track of my work, I write an extremely simple task manager: an XML file (for the data), XSL file (for the rendering) and HTML/CSS file (to render and use the browsers’ XSL capabilities). I call it taskviewer due to lack of more imagination ;-)

It is a simple manager with no user interface for managing it at all – so you’ll need to edit the XML file yourself. However, the HTML/CSS file, together with the XSL file, renders the content of the XML file in such a way that you have a nice overview of your tasks.

It’s “features” are simple:

  • keep track of events you are waiting for
  • keep track of a tasks’ dependencies (events or other tasks)
  • get an overview of tasks that can immediately start versus that are blocked, waiting for its dependencies to finish

There is an example available online with some hypothetical data.

If you know of a simple program (preferably java or one available for both Windows and Linux) that has similar features (especially tracking tasks depending on certain events), please do tell me. I’ve looked at tools like taskjuggler but couldn’t find one that remains simple yet has these features.

Comments 3 Comments »