You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 lines
1.6 KiB

  1. # SLiM - Simple Login Manager
  2. #
  3. # The display manager service manages the X servers running on the
  4. # system, providing login and auto-login services
  5. #
  6. # based on lightdm upstart script
  7. description "Simple Login Manager"
  8. author "Richard Johnson"
  9. start on ((filesystem
  10. and runlevel [!06]
  11. and started dbus
  12. and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
  13. or stopped udev-fallback-graphics))
  14. or runlevel PREVLEVEL=S)
  15. stop on runlevel [016]
  16. emits login-session-start
  17. emits desktop-session-start
  18. emits desktop-shutdown
  19. env XORGCONFIG=/etc/X11/xorg.conf
  20. script
  21. if [ -n "$UPSTART_EVENTS" ]
  22. then
  23. # Check kernel command-line for inhibitors, unless we are being called
  24. # manually
  25. for ARG in $(cat /proc/cmdline); do
  26. if [ "$ARG" = "text" ]; then
  27. plymouth quit || :
  28. stop
  29. exit 0
  30. fi
  31. done
  32. [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/slim" -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/slim" ] || { stop; exit 0; }
  33. if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
  34. then
  35. # Single-user mode
  36. plymouth quit || :
  37. exit 0
  38. fi
  39. fi
  40. if [ -r /etc/default/locale ]; then
  41. . /etc/default/locale
  42. export LANG LANGUAGE
  43. elif [ -r /etc/environment ]; then
  44. . /etc/environment
  45. export LANG LANGUAGE
  46. fi
  47. export XORGCONFIG
  48. exec slim
  49. end script
  50. post-start script
  51. sleep 5
  52. clear > /dev/tty7
  53. end script
  54. post-stop script
  55. if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
  56. initctl emit desktop-shutdown
  57. fi
  58. end script