start x@.service before xlogin@{{ vdr.user }}

This commit is contained in:
Alexander Grothe 2017-07-31 10:38:02 +02:00
parent 97999797c0
commit ea5ea149f9
3 changed files with 27 additions and 4 deletions

View File

@ -1400,16 +1400,24 @@ b'\xde\xad\xbe\xef'
#+END_SRC
**** setup-xorg
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/setup-xorg.yml :mkdirp yes :padline no
- name: create directory /etc/systemd/system/vdr.service.d/
- name: create directories for systemd drop-in files
file:
dest: /etc/systemd/system/vdr.service.d/
dest: '{{ item }}'
state: directory
with_items:
- /etc/systemd/system/x@.service.d/
- /etc/systemd/system/vdr.service.d/
- name: add dependency to X-server for vdr.service using a drop-in
template:
src: templates/vdr-xorg.conf
dest: /etc/systemd/system/vdr.service.d/vdr-xorg.conf
- name: start x@.service before xlogin@.service
template:
src: templates/x@service.d/xlogin.conf.j2
dest: /etc/systemd/system/x@.service.d/xlogin.conf
- name: load environment file for vdr.service
template:
src: templates/systemd/vdr-environ.j2
@ -1629,6 +1637,11 @@ Before=graphical.target
Type=forking
ExecStart=/usr/bin/x-daemon -logverbose 6 -noreset %I -config /etc/X11/xorg-debug.conf
#+END_SRC
***** Drop-in snippet for x@.service
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/x@service.d/xlogin.conf.j2 :mkdirp yes :padline no
[Unit]
Before=xlogin@{{ vdr.user }}
#+END_SRC
***** Drop-in snippet for vdr.service
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no
# file: roles/yavdr-xorg/templates/vdr-xorg.conf

View File

@ -1,13 +1,21 @@
- name: create directory /etc/systemd/system/vdr.service.d/
- name: create directories for systemd drop-in files
file:
dest: /etc/systemd/system/vdr.service.d/
dest: '{{ item }}'
state: directory
with_items:
- /etc/systemd/system/x@.service.d/
- /etc/systemd/system/vdr.service.d/
- name: add dependency to X-server for vdr.service using a drop-in
template:
src: templates/vdr-xorg.conf
dest: /etc/systemd/system/vdr.service.d/vdr-xorg.conf
- name: start x@.service before xlogin@.service
template:
src: templates/x@service.d/xlogin.conf.j2
dest: /etc/systemd/system/x@.service.d/xlogin.conf
- name: load environment file for vdr.service
template:
src: templates/systemd/vdr-environ.j2

View File

@ -0,0 +1,2 @@
[Unit]
Before=xlogin@{{ vdr.user }}