Advertisement
Guest User

Untitled

a guest
Sep 28th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. # lxdm - LXDE Display Manager
  2. #
  3. # The display manager service manages the X servers running on the
  4. # system, providing login and auto-login services
  5. # Based on gdm upstart script
  6.  
  7. description "LXDE Display Manager"
  8. author "William Jon McCann <mccann@jhu.edu>"
  9.  
  10. start on ((filesystem
  11. and runlevel [!06]
  12. and started dbus
  13. and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
  14. or stopped udev-fallback-graphics))
  15. or runlevel PREVLEVEL=S)
  16.  
  17. stop on runlevel [016]
  18.  
  19. emits login-session-start
  20. emits desktop-session-start
  21. emits desktop-shutdown
  22.  
  23. env XORGCONFIG=/etc/X11/xorg.conf
  24.  
  25. script
  26. if [ -n "$UPSTART_EVENTS" ]
  27. then
  28. [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lxdm" ] || { stop; exit 0; }
  29.  
  30. # Check kernel command-line for inhibitors
  31. for ARG in $(cat /proc/cmdline)
  32. do
  33. case "${ARG}" in
  34. text|-s|s|S|single)
  35. exit 0
  36. ;;
  37. esac
  38. done
  39. fi
  40.  
  41. if [ -r /etc/default/locale ]; then
  42. . /etc/default/locale
  43. export LANG LANGUAGE LC_MESSAGES
  44. elif [ -r /etc/environment ]; then
  45. . /etc/environment
  46. export LANG LANGUAGE LC_MESSAGES
  47. fi
  48.  
  49. #Export PATH from /etc/environment
  50. if [ -r /etc/environment ]; then
  51. . /etc/environment
  52. export PATH
  53. fi
  54.  
  55. export XORGCONFIG
  56.  
  57. exec lxdm-binary $* $CONFIG_FILE
  58. end script
  59.  
  60. post-stop script
  61. if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
  62. initctl emit desktop-shutdown
  63. fi
  64. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement