Archive for 2010


I recently purchased an Asus EeePC 1201N for the purpose of running OS X Snow Leopard, Windows 7 and some flavour of Linux.  Each OS has a different purpose.  I’ve been looking for a lightweight laptop to take with me when travelling, specifically for the purpose of importing my photos, geotag them and keyword them while things are fresh in memory.  Aperture is my tool of choice, so I needed something with enough oomph and a decent enough display.   Windows is purely to get to know it, as I haven’t touched it since XP days, and I’m getting rusty.  Linux is what I use at work, and what I use for a lot of things outside of my day job.

As you might know, the wireless card in the 1201N doesn’t work in OS X, and the Dell 1510 card is widely recommended.  It uses a Broadcom BCM4322 chip, which works natively in OS X.  Unfortunately Broadcom chips tend to be somewhat shaky in Linux, unless you go with ndiswrapper for driver support, which wouldn’t work for my needs, so I had to look for something else.

Things are further complicated by the 1201N using a low-profile Mini-PCIe card.  There aren’t too many of them around, and finding one that has good driver support in both OS X and Linux, wasn’t easy.  Fortunately I stumbled upon a card based on the Atheros AR5B91 chip, which I know will work in Linux, and works natevly in OSX.

Front:
Atheros AR5B91 Mini-PCIe Wireless card

View full article »

I had to solve a problem for a customer where they need to delegate management of backup MX servers to their clients. Of course, they don’t want to give their clients root access to their server, but they can write an app that gives users access to certain entries in a database, based on their privileges. This means I can join my two favourite server apps in the world: Postfix + MySQL

First, we need to create a database and some tables. These are quick and dirty and only meant to be a proof of concept. The fields a pretty straight forward: id is just a number, domain is the domain being relayed, and destination is the primary MX or where ever you need the mail to go. The syntax is as per the Postfix transport documentation. :domain.tld will do an mx lookup on domain.tld, and smtp:host.domain.tld will deliver directly to the host specified. My database is called ‘backupmx’

CREATE TABLE `domains` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `domain` varchar(128) NOT NULL DEFAULT '',
  `destination` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `domain` (`domain`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

CREATE TABLE `recipients` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `address` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `address` (`address`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

View full article »

I encountered this today when trying to query a package on a Red Hat server:

rpmdb: Lock table is out of available locker entries
error: db4 error(22) from db->close: Invalid argument
error: cannot open Name index using db3 – Cannot allocate memory  (12)

This happens when an operation involving the rpm db gets interrupted and the locks not cleared.  The solution is rather simple:

1.   Make a backup of /var/lib/rpm   (because you never know)

2.   rm /var/lib/rpm/__db.00*

3.   rpm --rebuilddb

You should have a working rpm databse now.

I came across an error after upgrading a Plesk server from 8.6 to 9.2.3:

# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_kav_restore... not exsists
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_grey_restore... ok
awk: cmd. line:50: (END OF FILE)
awk: cmd. line:50: invalid char '�' in expression
unable to process "pop3d"
awk: cmd. line:50: (END OF FILE)
awk: cmd. line:50: invalid char '�' in expression
unable to process "pop3d-ssl"
awk: cmd. line:50: (END OF FILE)
awk: cmd. line:50: invalid char '�' in expression
unable to process "imapd"
awk: cmd. line:50: (END OF FILE)
awk: cmd. line:50: invalid char '�' in expression
unable to process "imapd-ssl" 

View full article »

Have you ever been frustrated when trying to find a hidden file, or a file in a hidden directory, from an application’s open dialog? I’ve run into this a few times when trying to open disc images from disc utility. There’s an easy solution: browse to the directory where the hidden file/directory is, and hit:

Command-Shift-. [period]

This will show the hidden files. Hitting the same combination again hides them again. This might not work, depending on your region settings or key bindings. Try Command-Shift-, [comma] instead.