Advertisement
Guest User

Untitled

a guest
Feb 12th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.07 KB | None | 0 0
  1. --- oe-core/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm 2012-08-10 18:18:45.610022519 +0100
  2. +++ meta-oe/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm   2011-11-09 10:23:52.916190208 +0000
  3. @@ -1,20 +1,8 @@
  4.  #!/bin/sh
  5. -#
  6. -### BEGIN INIT INFO
  7. -# Provides: xserver
  8. -# Required-Start: $local_fs $remote_fs dbus
  9. -# Required-Stop: $local_fs $remote_fs
  10. -# Default-Start:     2 3 4 5
  11. -# Default-Stop:      0 1 6
  12. -### END INIT INFO
  13.  
  14. -killproc() {            # kill the named process(es)
  15. -        pid=`/bin/pidof $1`
  16. -        [ "$pid" != "" ] && kill $pid
  17. -}
  18. +. /etc/init.d/functions
  19.  
  20. -read CMDLINE < /proc/cmdline
  21. -for x in $CMDLINE; do
  22. +for x in $(cat /proc/cmdline); do
  23.          case $x in
  24.          x11=false)
  25.         echo "X Server disabled"
  26. @@ -25,25 +13,23 @@
  27.  
  28.  case "$1" in
  29.    start)
  30. +    # We don't want this script to block the rest of the boot process
  31. +    if [ "$2" != "background" ]; then
  32. +      $0 $1 background &
  33. +    else
  34. +       # work around from /etc/X11/Xinit
  35. +       export USER=root
  36. +       export HOME=/home/root
  37. +       if [ ! -d $HOME ] && [ -d /root ]; then
  38. +         HOME=/root
  39. +       fi
  40. +
  41.         . /etc/profile
  42. -       username=root
  43. +
  44.         echo "Starting Xserver"
  45. -       if [ -f /etc/X11/Xusername ]; then
  46. -           username=`cat /etc/X11/Xusername`
  47. -           # setting for rootless X
  48. -           chmod o+w /var/log
  49. -           chmod g+r /dev/tty[0-3]
  50. -           chmod o+rw /dev/input/*
  51. -           # hidraw device is probably needed
  52. -           if [ -e /dev/hidraw0 ]; then
  53. -               chmod o+rw /dev/hidraw*
  54. -           fi
  55. -       fi
  56. -       # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
  57. -       su -l -c '/etc/X11/Xserver&' $username
  58. -       # Wait for the desktop to say its finished loading
  59. -       # before loading the rest of the system
  60. -       # dbus-wait org.matchbox_project.desktop Loaded
  61. +       . /etc/X11/xserver-common
  62. +       xinit /etc/X11/Xsession -- `which $XSERVER` $ARGS >/var/log/Xsession.log 2>&1
  63. +    fi
  64.    ;;
  65.  
  66.    stop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement