daily pastebin goal
71%
SHARE
TWEET

adsdadassdada

a guest Jul 26th, 2015 221 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 plymouth-ready)
  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. script
  24.     if [ -n "$UPSTART_EVENTS" ]
  25.     then
  26.         # Check kernel command-line for inhibitors, unless we are being called
  27.         # manually
  28.         for ARG in $(cat /proc/cmdline); do
  29.             if [ "$ARG" = "text" ]; then
  30.                 plymouth quit || :
  31.                 stop
  32.                 exit 0
  33.             fi
  34.         done
  35.  
  36.         [ ! -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; }
  37.  
  38.         if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
  39.         then
  40.             # Single-user mode
  41.             plymouth quit || :
  42.             exit 0
  43.         fi
  44.     fi
  45.  
  46.     exec lightdm
  47. end script
  48.  
  49. post-start script
  50.     sleep 5
  51.     clear > /dev/tty7
  52. end script
  53.  
  54. post-stop script
  55.         clear > /dev/tty7
  56.         sleep 1
  57.         if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
  58.                 initctl emit desktop-shutdown
  59.         fi
  60. end script
RAW Paste Data
Top