Author Archive

This is actually surprisingly simple. You’ll need inotify-tools and sendxmpp. In Debian-based distributions, just install the two packages:

bash# apt-get install inotify-tools sendxmpp

Next, you’ll want to set your username, server, and password in ~/.sendxmpprc since you probably don’t want to put those on the command line and have them show up in the process list. The sendxmpprc file is very simple, just add the following line (note that service is optional, but may be required for sendxmpp to work with some servers):

user@domain.tld password service

And make sure to replace user, domain, and password with appropriate values. :)

Now, let’s say you wanted to be notified of any changes to your home directory. All you’d have to do is issue the following command:

inotifywait -mr /home/username | sendxmpp -ti user@domain.tld

The -m switch tells inotify not to exit after an event is received. The -r switch tells it to monitor recursively. The -t switch tells sendxmpp to log in securely with TLS. You may need to use -e instead if your server only supports SSL. -i tells sendxmpp to send messages interactively (i.e., it sends line by line from STDIN).

That’s all there is to it. Check out the man pages for inotifywait and sendxmpp for more fun options.

I’ve been setting up some ubuntu minimal VMs just for screwing around lately, and one irritating thing that happens is if, for whatever reason, things don’t go 100% smoothly, you’ll likely find yourself with an “Installation Step Failed” error with NO additional information. Now, I know exactly what I did to make the installer unhappy (I hit ^C in aptitude during the manual package select), but what was vexing was that there was no information whatsoever on where to look to fix it. I was assuming that with the “Expert Install” option, Canonical might provide more verbose error messages than just the following:

Installation step failed - An installation step failed. You can try to run the failing item again from the menu, or you can skip it and choose something else. The failing step is: Select and install software

Stupid ambiguous Ubuntu installer error

I know exactly what I did wrong, it should be a trivial matter of removing a lock file or some such thing to fix this. The problem is that there is ABSOLUTELY NO information in this message. No path or file name, no returned error message, nothing. I understand shielding the uninitiated user from these sorts of confusing things, but come on, I chose “expert install.” The least you could do is throw me a meaningful error message.

This situation was easily resolved by checking /var/run, of course, and deleting the 'chroot-setup.lock' file. I’m just having a hard time getting over the fact that there is not one iota of extra information in this error message. Not even a ‘Installation failed. Check /var/log/stupid-ubuntu-setup-crap.log’ or anything.

Now, I’m going to rant on a little more, because I feel like indulging myself. Please bear with me, or go do something else. This issue has come up a few times, now, with my experimentation with various VM setups. It’s my fault for using Ubuntu, probably, but I like the Ubuntu minimal setup because the ISO is only 20mb, there are a lot of options, etc. Anyhow, the MOST irritating part (this supersedes any previous ‘most irritating parts’) is that the installer says you can try the failing item again or choose a different item. The joke is that any step that you choose from the installer menu will check for the presence of /var/run/chroot-setup.lock. Even if you try to repartition the hard drive and just want to install everything over again, it’ll still fail with that same error message. Even if you mkfs.<whatev> /dev/hdWhatever from the command line, /var/run/chroot-setup.lock will still be there, ruining your day.

So, the moral of the story is, I’m cranky in the morning.

 

P.S., use Gentoo or Debian. Or CentOS, I suppose, if you swing that way. ;)

Here at Swagpile, we came across a situation where we had a server running Debian Lenny (5.0), but there were several packages we needed which were only available in Debian Squeeze (6.0). Unfortunately, the server in question was running on a VPS under Virtuozzo, so upgrading the kernel wasn’t a very realistic option. After poking around online, I determined that this was feasible and that we should go ahead with the upgrade. Read More »

I just stumbled across this article first thing this morning. Very pleasant news to wake up to.

Here’s the HTC Developer Center link. Download the kernel source there. I haven’t had a chance to look at it yet, but man, I sure did download the hell out of it already!

This is a follow-up to the post I did earlier, here. I will demonstrate how to use the earlier script to backup to a local filesystem location, or any other storage engine supported by duplicity.

Read More »

OK, so today I set out to create a very simple backup script (bash) that could be run periodically from the crontab to backup the contents of an arbitrary directory in the filesystem (in this case, my user’s home directory). I was originally planning on doing a simple tar incremental or differential backup script when I stumbled upon a neat little utility called duplicity. It’s apparently been around for quite some time and is in fairly common use, but… it’s new to me!

Read More »