# vim: filetype=sh

prepare_rootfs()
{
    if [ "$1" = "draft" -a "$2" = "outside" ]
    then
        update_apt_conf
        prepare_rootfs_for_emulation
    fi
}

cleanup_rootfs()
{
    if [ "$1" = "draft" -a "$2" = "outside" ]
    then
        # Boot files will be on a different partition.
        # Move them out now because they should not be
        # counted for the minimal rootfs size estimation.
        mv boot $DBSTCK_TMPDIR/boot_files
    fi
    if [ "$1" = "final" -a "$2" = "outside" ]
    then
        cleanup_rootfs_for_emulation
    fi
}
