Archive for November 2007

 
 

new “life stream” aggregation site – onaswarm.com

I recently discovered onaswarm (via Danny Ayers via PlanetRDF) and decided to send in a beta request.

I have been trying various tools to do this sort of thing, heck I’ve tried to write (well, started to write is more like it) and often just ran into time and or resource issues, so I was excited to see this new site.

I’ve wandered around the site only a little bit so far and it’s been solid, but I haven’t really tried to break or abuse it yet :)

Some high points I’ve noticed already: it supports OpenID, has a kick-ass “find your feeds” page where you enter in four different account id’s and it tries to locate them in it’s list of supported sites. It managed to find all of the major sites I use currently.

But the one feature I really like is one I found out only after reading the blog page – it’s written in Python!
Going to pay more attention to this and give it a workout.

missrogue interviews Satisfaction team

missrogue (aka Tara Hunt from HorsePigCow.com) interviews the team behind a great website, Satisfaction, that enables companies to have amazing customer support by making sure that the company stays out of the picture :)

While you can tell she is still learning the ropes of creating video content, I’m glad she is entering the fray just because anyone with her abilities will quickly master the medium. Then the ideas and information will just snap.

Leopard changed default partition table type breaking makediskimage.sh

Not sure where exacly I found makediskimage.sh, heck probably saw another project using it, but for sure it has saved a lot of hassle back when I was learning how to create disk image files.

Unfortunately it doesn’t have any author or history so I never knew who to thank :(

With the Leopard upgrade it suddenly stopped working. The HFS format step was failing and was just outputing it’s help text. Looking at the line just above in the script that generated that output, I noticed that the echo output was not correct:

...
created: /tmp/20096.dmg
Creating HFS partition Chandler_iosx_debug_0.7.3.dev-r15733 on /tmp/20096.dmg at

usage: newfs_hfs [-h | -w] [-N] [hfsplus-options] special-device
options:
...

The line that starts “Creating HFS partition…” should end with “at /dev/disk5s1″ – what drive the HFS formatting would have happened on.

The bash script segment responsible for that is:

DEVICES=`hdid -nomount $TMPFILE`
DEVMASTER=`echo $DEVICES| awk '{ print $1 }'`
DEVHFS=`echo $DEVICES| awk '{ print $5 }'`
echo Creating HFS partition $NAME on $TMPFILE at $DEVHFS
newfs_hfs -v "$NAME" $DEVHFS

The line of interest is the output of hdid – up until Leopard it would output something like:

oliver:~ bear$ hdid -nomount /tmp/bear.dmg
/dev/disk2          	Apple_partition_scheme
/dev/disk2s1        	Apple_partition_map
/dev/disk2s2        	Apple_HFS

Which shows the drive and two partitions, but under Leopard it now outputs:

imac3:~ bear$ hdid -nomount /tmp/bear.dmg
/dev/disk5          	GUID_partition_scheme
/dev/disk5s1        	Apple_HFS

When you pass that to an environment variable (which, remember, removes all line feeds and makes it into a long string) you now get:

DEVHFS=/dev/disk5  GUID_partition_scheme  /dev/disk5s1  Apple_HFS

Instead of

DEVHFS=/dev/disk2  Apple_partition_scheme  /dev/disk2s1  Apple_partition_map  /dev/disk2s2  Apple_HFS

Basically to try and get to an actual point :) – when

awk '{ print $5 }'

is run on the new output there isn’t a fifth item so you get nothing back.

The fix is to switch to a method that isn’t dependent on the layout of the columns *and* the lines:

DEVHFS=`hdid -nomount $TMPFILE | grep Apple_HFS | awk '{ print $1 }'`

Now we take the raw output, grep for the line we really want and grab the first column of that. With the extra bonus of it working now on all OS X’s I could get my hands on to test.

Anywho, just wanted to post this in case someone else runs into their makediskimage.sh script suddenly start to fail.


Creative Commons Attribution-ShareAlike 3.0 United States
This work by Mike Taylor is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States.