case "$MODE" in
    configure)
        OVERRIDE_EXPORTS=${OVERRIDE_EXPORTS:-"false"}
        ;;
    finalization)
        # Export LTSP chroot using NFS to the LTSP client network
        if ! grep -q "^$BASE" /etc/exports ; then
            if [ "$OVERRIDE_EXPORTS" = "true" ]; then
                cat <<EOF >> /etc/exports
# Automatically added by ltsp-server
$BASE       *(ro,no_root_squash,async)
EOF
                invoke-rc.d nfs-kernel-server reload
            else
                cat <<EOF
WARNING: no entry for $BASE in /etc/exports,
you may want to add the following line to /etc/exports:

$BASE       *(ro,no_root_squash,async)

and then run the command:

invoke-rc.d nfs-kernel-server reload
EOF
            fi
        fi
        ;;
esac
