This does look better, I love the use of operators over if statements.
I don't think using a temp file is necessary here.  I also wish the
regex wouldn't ever match a device containing the name of another
device, in that it should match the surrounding bits.

{ dmraid -r -c 2>/dev/null || true } | grep -q "$device" && return 0

Reply via email to