#!/bin/sh

. /lib/partman/definitions.sh

dev="$2"
id=$3

[ -f $dev/$id/method ] || exit 0

method=$(cat $dev/$id/method)

choices=$(cat $dev/$id/available_filesystems)

db_fset partman-target/choose_filesystem seen false
if 
    debconf_select critical partman-target/choose_filesystem "$choices" asdf ||
    [ $? -lt 100 ]
then
    [ -d "$dev/$id" ] || mkdir "$dev/$id"
    echo $RET >$dev/$id/filesystem
    update_partition $dev $id
fi

