Tim Hatch

Weblog | Photos | Projects | Panoramas | About

The world's worst unix program 12 Oct, 2006

I attempted to install a program today on a Linux box. It’s called the Backup Exec Workstation Agent, which talks to the Backup Exec Media Server, but the manual doesn’t say that too clearly.

It comes in an archive called BE_AGENT.tar. Yes, .tar, uncompressed. Apparently some OS that it works on doesn’t have gunzip.

Once you extract it, it does not create a subdirectory, so you’d better hope that it’s already by itself. If it’s not, the file you’re looking for is called INSTALL. Yes, it is executable.

$ ./INSTALL

Pretty soon, you’re presented with some options, including the horribly awful installation location of /etc/bkupexec for vendor-supplied binaries. Somewhere around 1999 we decided that stuff goes in /opt.

Then in a second, you get the following:

english/SETUP: line 368: /etc/rc.d/agent.init: No such file or directory
ln: creating symbolic link `/etc/rc.d/rc2.d/S96agent.be' to `/etc/rc.d/agent.init': No such file or directory
ln: creating symbolic link `/etc/rc.d/rc3.d/S96agent.be' to `/etc/rc.d/agent.init': No such file or directory
ln: creating symbolic link `/etc/rc.d/rc5.d/S96agent.be' to `/etc/rc.d/agent.init': No such file or directory

Yeah, that’s right. It’s trying to install something into /etc/rc.d which doesn’t exist. That would have been simple to check if -d /etc/rc.d but apparently they didn’t think that anyone would store their init scrips elsewhere.

It prefers its own hostname listed in uppercase (for Some Unknown Reason) so it needs to uppercase it. Rather than use tr or perl or any of the myriad other ways to uppercase a string, it writes a tempfile, uses dd on it, then reads it back in. Since it doesn’t redirect stderr, you’re presented with the lovely interlude,

0+1 records in
0+1 records out
10 bytes transferred in 0.000309 seconds (32355 bytes/sec)

Nice to know that dd completed successfully, you know, uppercasing my string and all.

The script was just about to finish running, when I saw the following:

chown: cannot access `/etc/rc.d/agent.init': No such file or directory
chmod: cannot access `/etc/rc.d/agent.init': No such file or directory
chown: cannot access `/etc/rc.d/rc2.d/S96agent.be': No such file or directory
chmod: cannot access `/etc/rc.d/rc2.d/S96agent.be': No such file or directory

Oops. Okay, we can fix that. After the script finished executing, I expected to find an uncopied agent.init file that I could manually place in /etc/init.d, but no. It turns out that Backup Exec Workstation Agent for UNIX deletes all its installation files, whether they copied successfully or not. So I ended up reinstalling four times in order to make sure it had all the right things in the right spots with no further errors.

In their defense, it works properly once installed, and after being copied to the proper location, the initscript even executes properly on Debian!

Rough Installation Steps

$ mkdir /etc/rc.d
$ cd /path/to/installer
$ ./INSTALL

# Settings... blah.

$ cd /etc/init.d
$ mv ../rc.d/agent.init beagent
$ update-rc.d beagent defaults
 Adding system startup for /etc/init.d/beagent ...
   /etc/rc0.d/K20beagent -> ../init.d/beagent
   /etc/rc1.d/K20beagent -> ../init.d/beagent
   /etc/rc6.d/K20beagent -> ../init.d/beagent
   /etc/rc2.d/S20beagent -> ../init.d/beagent
   /etc/rc3.d/S20beagent -> ../init.d/beagent
   /etc/rc4.d/S20beagent -> ../init.d/beagent
   /etc/rc5.d/S20beagent -> ../init.d/beagent

Sunset at McKenna 04 Oct, 2006

Sunset from McKenna Park in Denton. Handheld by Cameron Adamez.

Sunset

Ray's Grillz 04 Oct, 2006

Ray, who used to be Apple Club president but is now the Campus Dell Rep, came by to show off some stuff, including his new sidekick. Here are some pics:

Ray's Mug

Ray's Grill