tech stuff.

OpenBSD Embedded Router

with 4 comments

The excellent flashrd project makes easy work of installing OpenBSD as an embedded platform.  I had an excellent experience installing OpenBSD 5.0 on a PCEngines ALIX 2d13 using a 4GB CF.  A rough outline of the steps follows.

Read the rest of this entry »

Written by Lee Verberne

2011/06/12 at 10:43

Posted in BSD

Tagged with

Shells shells everywhere

leave a comment »

tmux makes it easy to construct a plethora of ssh connections via tmux neww "ssh $HOST", so I find myself frequently doing this from scripts.  tmux uses a shell to execute the ssh command, though, and I never liked how it left idle shells littering my process tree thusly:

\-+= 23132 user tmux: server (/tmp/tmux-505/default) (tmux)
  |-+= 25189 user sh -c sh
  | \--- 01613 user ssh hostA
  |-+= 08778 user sh -c sh
  | \--- 03665 user ssh hostB

Recently I actually bumped into my process limit and couldn’t spawn any new windows. This turned out to be pretty solve, though. I couldn’t figure out how to convince tmux not to use a shell to execute the command, but we can at least replace that shell process by telling the shell to exec rather than fork/exec. Now my script looks like this, and my process tree is nice and tidy.

let i=1
for host in $hosts; do
  tmux neww -d -n ${host%%.*} -t $session:$i "exec ssh $host"
  let i=i+1
done

Written by Lee Verberne

2011/06/12 at 08:48

Posted in BSD

Tagged with ,

OpenBSD creating additional ptys

with one comment

I like a lot of windows.  A lot of them.  Today I bumped into a default limit on OpenBSD 4.8 and tmux(1) started returning “No such file or directory” when I attempted to create a new window.  This turned out to be a simple thing to solve, though.

Read the rest of this entry »

Written by Lee Verberne

2011/03/16 at 10:21

Posted in BSD

Tagged with ,

Dell OMSA quick links

leave a comment »

In my recent web scour, here are the most useful links for a minimal install of Open Manage Server Administrator to keep an eye on storage status.

Random Notes for OMSA & Dell Update Packages on CentOS 5:

  • Use the more recent OpenIPMI package from Dell’s yum repo
  • Dell Update Packages rely on libstdc++-33.i386 (which is documented) but also libxml2.i386 & procmail (which is not)

Written by Lee Verberne

2011/03/14 at 13:44

Posted in Linux

Tagged with , ,

Dell embraces and extends command line utilities

leave a comment »

From Dell’s OMSA Manual:

Use the omreport -? command to get a list of the available commands for omreport.

Really, Dell?  You’ve decided to go another way on the whole CLI thing?  That’s cool, I’m sure there wasn’t any good reason every other Unix utility uses -h for help.  Oh wait…

# ./omreport -?
zsh: no matches found: -?
zsh: exit 1 ./omreport -?

Thanks Dell. What I needed was another special case in my life.

Written by Lee Verberne

2011/03/14 at 11:04

Posted in Linux

Tagged with

Software RAID on OpenBSD 4.8

with 2 comments

jpiasetz has a very good recipe on installing with software raid on OpenBSD 4.6, and so far I’ve had good success doing something very similar with OpenBSD 4.8. The biggest thing I changed was using wd1a rather than sd0a for /altroot. Then it’s easy enough to use daily(8)’s integrated altroot sync to keep altroot up-to-date.

Read the rest of this entry »

Written by Lee Verberne

2011/03/06 at 10:56

Posted in BSD

Tagged with

OpenBSD 4.8 duplicity port isn’t getting the job done

with one comment

Trying to use duplicity from the current OpenBSD -stable (4.8) was a non-starter for me.  The failure took the form of:

% duplicity -v1 /path/to/files file:///path/to/backups
Traceback (most recent call last):
File "/usr/local/bin/duplicity", line 1236, in
with_tempdir(main)
File "/usr/local/bin/duplicity", line 1229, in with_tempdir
fn()
File "/usr/local/bin/duplicity", line 1207, in main
full_backup(col_stats)
File "/usr/local/bin/duplicity", line 416, in full_backup
globals.backend)
File "/usr/local/bin/duplicity", line 294, in write_multivol
globals.gpg_profile, globals.volsize)
File "/usr/local/lib/python2.5/site-packages/duplicity/gpg.py", line 278, in GPGWriteFile
bytes_to_go = data_size - get_current_size()
File "/usr/local/lib/python2.5/site-packages/duplicity/gpg.py", line 270, in get_current_size
return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/tmp/duplicity-leH-Rr-tempdir/mktemp-nQQHGO-2'

Which turned out to be a terribly confusing and unrelated error message. The error reported in the above stack trace was actually an error in the cleanup process. The actual problem had been masked by duplicity’s gpg fork a long time prior.

So what was the problem?

  1. pkg_add satisfied duplicity’s gnupg dependency by installing gnupg-2.0.15
  2. duplicity’s child was attempting to execute gpg, but only gpg2 had been installed by gnupg-2.0.15

That’s right. This problem was solved with ln -s /usr/local/bin/gpg2 /usr/local/bin/gpg.

Well, at least I had the opportunity to get intimate with the python debugger…

Written by Lee Verberne

2011/03/02 at 21:45

Posted in BSD

Tagged with ,