2 # Get the locations for the files from a single place to avoid confusion
3 OBDDIR="`dirname $0`/.."
4 [ "$OBDDIR" = "" ] && OBDDIR=".."
5 . $OBDDIR/demos/config.sh
7 #if [ "$TMPFILE" -a -f $TMPFILE ]; then
8 # echo "$TMPFILE exists; I'm unwilling to overwrite it." 1>&2
12 # We assume the loop module will be installed by kerneld if required.
13 # If not, the following line should be uncommented.
16 if [ "$LOOPDEV" -a "`losetup $LOOPDEV 2> /dev/null`" ]; then
17 echo "It appears that $LOOPDEV is in use. Unable to continue" 1>&2
18 echo "You need to clean up $LOOPDEV (via cleanup.sh),"
19 echo "or you can change which device is used in demos/config.sh" 1>&2
23 [ "$TMPFILE" ] && dd if=/dev/zero of=$TMPFILE bs=1k count=10k
25 [ "$LOOPDEV" ] && losetup $LOOPDEV $TMPFILE
26 if [ "$BASEDEV" ]; then
27 mke2fs -b 4096 $BASEDEV
29 echo "\$BASEDEV not defined in demos/config.sh. Please fix!"