#!/bin/sh -e

PLACES="$PLACES /cdrom/live/filesystem.ext2"
PLACES="$PLACES /cdrom/casper/filesystem.ext2" # Etch support

ext2_prepare() {
	modprobe ext2 || true

	mkdir -p /mnt
	umount /mnt > /dev/null 2>&1 || true
	if ! mount -t ext2 -o loop $place /mnt; then
		error "$place has failed to be mounted as ext2."
		exit 1
	fi

	cd /mnt
}

ext2_count() {
	echo `print-inodes /mnt`
}
