--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ --- xinit.orig/files/xdm.confd-1 +++ xinit/files/xdm.confd-1 @@ -9,4 +9,16 @@ CHECKVT=7 # NOTE: If this is set in /etc/rc.conf, that setting will override this one. # KDE-specific note: kdm-3.5 and kdm-4.0 are just examples. You will find all # possible versions by looking at the directories in /usr/kde/. +# NOTE (2): If you want to use your custom DISPLAYMANAGER, you can specify a +# full path to an executable. +# DISPLAYMANAGER="xdm" + +# If you specify a custom DISPLAYMANAGER value (one unsupported) +# you can also specify a custom pidfile that your application is +# supposed to use and that will be handled by start-stop-daemon +# to properly start/restart/stop it. +# If you don't specify any value and use an unsupported DISPLAYMANAGER +# CUSTOM_DISPLAYMANAGER_PIDFILE will be placed into +# /var/run/.pid +# CUSTOM_DISPLAYMANAGER_PIDFILE="" --- xinit.orig/files/xdm.initd-3 +++ xinit/files/xdm.initd-3 @@ -56,12 +56,18 @@ depend() { setup_dm() { local MY_XDM="$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')" + local MY_CUSTOM_PIDFILE="$(echo "${CUSTOM_DISPLAYMANAGER_PIDFILE}" | tr '[:upper:]' '[:lower:]')" + MY_CUSTOM_PIDFILE="${MY_CUSTOM_PIDFILE:-/var/run/$(basename ${MY_XDM}).pid}" # Load our root path from profile.env # Needed for kdm PATH="${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")" case "${MY_XDM}" in + xdm) + EXE=/usr/bin/xdm + PIDFILE=/var/run/xdm.pid + ;; kdm|kde|kde2|kde3) EXE="$(which kdm)" # kdm takes too long to create a pidfile for baselayout-2 @@ -90,13 +96,9 @@ setup_dm() { PIDFILE=/var/run/gpe-dm.pid ;; *) - EXE= - # Fix #65586, where MY_XDM is empty so EXE=somedir - [ -x "/usr/bin/${MY_XDM}" ] && [ -f "/usr/bin/${MY_XDM}" ] \ - && EXE="/usr/bin/${MY_XDM}" - if [ -z "${EXE}" ] ; then - EXE=/usr/bin/xdm - PIDFILE=/var/run/xdm.pid + if [ -x "${MY_XDM}" ] && [ -f "${MY_XDM}" ]; then + EXE="${MY_XDM}" + PIDFILE="${MY_CUSTOM_PIDFILE}" fi ;; esac