#!/usr/bin/openrc-run

KERNEL_XDM_DISABLE_SWITCH=${KERNEL_XDM_DISABLE_SWITCH-"noxdm"}

depend() {
	provide ${SVCNAME}
}

start() {
	local rv=0
	ebegin "Starting \"${SVCNAME}\""
	if grep ${KERNEL_XDM_DISABLE_SWITCH} /proc/cmdline >/dev/null 2>&1; then
		update_me
		ewarn "${ME}: XDM is disabled from kernel command line."
		rv=1
	fi
	eend $rv
	return $rv
}

stop() {
	ebegin "Stopping \"${SVCNAME}\""
	eend 0
	return 0
}
