display-manager_depend() { need localmount want xdm-setup display-manager-setup # this should start as early as possible # (#139824) Start after ypbind and autofs for network authentication # (#145219 #180163) Could use lirc mouse as input device # (#70689 comment #92) Start after consolefont to avoid display corruption # (#291269) Start after quota, since some dm need readable home # (#390609) gdm-3 will fail when dbus is not running # (#366753) starting keymaps after X causes problems after bootmisc consolefont modules netmount after readahead-list ypbind autofs openvpn gpm lircmd after quota keymaps before alsasound # Start before use dbus xfs provide display-manager xdm } display-manager_start_pre() { if [ -f /etc/.nox ]; then eerror "Skipping ${name}, /etc/.noxdm found or \"noxdm\" bootparam passed." eerror "Remove /etc/.noxdm to resume the display manager" return 1; fi if [ -f /etc/.nogui ]; then eerror "Skipping ${name}, /etc/.nogui found or \"nogui\" bootparam passed." eerror "Remove /etc/.nogui to resume the display manager" return 1; fi } display-manager_stop_pre() { if [ -t 0 ]; then if type fgconsole >/dev/null 2>&1; then curvt=$(fgconsole 2>/dev/null) else curvt=$(tty) case "${curvt}" in /dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;; *) curvt= ;; esac fi fi } display-manager_stop_post() { # switch back to original vt if [ -n "${curvt}" ]; then if type chvt >/dev/null 2>&1; then chvt "${curvt}" else vidcontrol -s "$((curvt + 1))" fi fi }