Package: nodm
Version: 1.3-16
Please find attached the upstart job I created for nodm, based on the
current init script.
It does integrate with plymouth gracefully.
Please consider including it in the upstream release.
Best regards
Luigi Capriotti
# nodm - nodm Display Manager
#
description "Automatic Display Manager"
author "Luigi Capriotti"
start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udevtrigger))
stop on runlevel [016]
emits starting-dm
script
NODM_ENABLED=no
NODM_XINIT=/usr/bin/xinit
NODM_FIRST_VT=7
NODM_XSESSION=/etc/X11/Xsession
NODM_X_OPTIONS="-nolisten tcp"
NODM_USER=root
NODM_MIN_SESSION_TIME=60
# If you change the user to a non-root user, make sure you
# set allowed_users=anybody in /etc/X11/Xwrapper.config
if [ -f /etc/default/nodm ]
then
. /etc/default/nodm
fi
export NODM_XINIT NODM_XSESSION NODM_X_OPTIONS NODM_USER
NODM_MIN_SESSION_TIME NODM_FIRST_VT
if [ -n "$UPSTART_EVENTS" ] ; then
# Gracefully exit if the package or its dependencies have been removed
(but not purged).
[ -x /usr/sbin/nodm -a -x "$NODM_XSESSION" -a -x "$NODM_XINIT" ] || {
stop; exit 0; }
if [ "$NODM_ENABLED" = "no" ] || [ "$NODM_ENABLED" = "false" ] ; then
stop; exit 0;
fi
# Check kernel command-line for inhibitors
for ARG in $(cat /proc/cmdline)
do
case "${ARG}" in
text|-s|s|S|single)
plymouth quit || : # We have the ball here
exit 0
;;
esac
done
fi
initctl emit starting-dm
exec /usr/sbin/nodm
end script
pre-stop script
# Clean up the console before we switch to it, to avoid text flicker
if [ -x /usr/bin/tput ] ; then
tput -Tlinux reset > /dev/tty1 || true
fi
# Clear VT 1 of any console messages
clear >/dev/tty1 || true
end script