Advertisement
Guest User

Untitled

a guest
Jul 4th, 2013
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. # LightDM - light Display 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 gdm upstart script
  7.  
  8. description "LightDM Display Manager"
  9. author "Robert Ancell <robert.ancell@canonical.com>"
  10.  
  11. start on ((filesystem
  12. and runlevel [!06]
  13. and started dbus
  14. and started udev-finish
  15. and stopped udevtrigger
  16. and plymouth-ready)
  17. or runlevel PREVLEVEL=S)
  18.  
  19. stop on runlevel [016]
  20.  
  21. emits login-session-start
  22. emits desktop-session-start
  23. emits desktop-shutdown
  24.  
  25. script
  26. if [ -n "$UPSTART_EVENTS" ]
  27. then
  28. # Check kernel command-line for inhibitors, unless we are being called
  29. # manually
  30. for ARG in $(cat /proc/cmdline); do
  31. if [ "$ARG" = "text" ]; then
  32. plymouth quit || :
  33. stop
  34. exit 0
  35. fi
  36. done
  37.  
  38. [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/lightdm" -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] || { stop; exit 0; }
  39.  
  40. if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
  41. then
  42. # Single-user mode
  43. plymouth quit || :
  44. exit 0
  45. fi
  46. fi
  47. sleep 300
  48. exec lightdm
  49. end script
  50.  
  51. post-stop script
  52. if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
  53. initctl emit desktop-shutdown
  54. fi
  55. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement