post_install()
{
	if [ ! -h /etc/systemd/system/display-manager.service ]; then
		systemctl enable xdm.service
	fi
}

post_upgrade()
{
	post_install

	systemctl daemon-reload >/dev/null 2>&1
}

pre_remove()
{
	systemctl --no-reload disable xdm.service >/dev/null 2>&1
}

post_remove()
{
	systemctl daemon-reload >/dev/null 2>&1
}

op=$1
shift
$op $*
