#! /bin/sh -efu

#
# Moodle install tools
#
# @package   mt-install
# @copyright 2012 Aleksey Avdeev <solo@altlinux.ru>
# @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
#

PATH="/usr/sbin:$PATH"

cd /etc/alternatives/packages.d/
find -print0 \
	| xargs -0 grep -h '^/usr/sbin/mt-DB-setdb[[:space:]]' \
	| sed 's,[[:space:]]\+,\t,g' \
	| cut -f2 \
	| mt-install-scriptnametodbtype
