#!/bin/sh -e

# which others support -q?
if [ $fstype = "ext2" -o $fstype = "ext3" ]; then
	options="-q"
elif [ $fstype = "reiserfs" ]; then
	options="-fq"
fi

for i in 0 1 2 3 4 5 6 7; do
	mknod /dev/ubd$i b 98 $(($i * 16));
done

echo yes | mkfs.$fstype $options /dev/ubd1
