Dave's Free Press: Journal

violence, pornography, and rude words for the web generation

 

Recent posts

(subscribe)

Recently commented posts

(subscribe)

Journals what I read

geeky politics rant silly religion meta music perl weird drinking culture london language transport sport olympics hacking media maths web photography etiquette spam amazon film bastards books bryar holidays palm telecoms cars travel yapc bbc clothes rsnapshot phone whisky security home radio lolcats deafness environment curry art work privacy iphone linux unix go business engineering kindle gps economics latin anglo-saxon money bramble cars environment electronics
Wed, 11 Jun 2008

Per-user resolv.conf files

I want per-user resolv.conf files. I've mentioned this in a couple of places and got asked why. It's so that I can have a consistent set of aliases everywhere I go (so I can, eg, type ssh sdf instead of ssh sverige.freeshell.org) and also so that the resolver will fill in my choice of domain on the end of hostnames, so I can be lazy and type ssh plough instead of ssh plough.barnyard.co.uk.

Some quick googling didn't turn up anything usefully cross-platform, but the implementation shouldn't be too hard - just set LD_LIBRARY_PATH or LD_PRELOAD and provide my own resolver library. Unfortunately, the resolver is part of libc so I need to figure out how to:

  • persuade arbitrary binaries to load an extra library;
  • have that library effectively replace bits of libc ...
  • ... even when the functions I'm replacing are called by other functions in libc

Damn, I might have to read about how the linker actually works if I'm ever to do this.

Posted at 19:10 by David Cantrell
keywords: geeky | unix
Permalink | 5 Comments
Tue, 20 Feb 2007

The value of backups

Yesterday, my file server crashed badly. I hit the per-user process limit, so couldn't log in remotely, couldn't log in on the console - and so couldn't do a graceful shutdown. So I cycled the power. When it came back up, one of the filesystems was a bit buggered, as expected. But it was a bit more buggered than I first thought and couldn't be recovered. So I mkfsed it, adding journalling while I was at it, and it is now restoring from the last backup.

Rsnapshot FTW!

Posted at 20:12 by David Cantrell
keywords: geeky | rsnapshot | unix
Permalink | 0 Comments

Archive