xorg-server: monitor debug.conf, start with debug logging if we start in debug mode, service files rework

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-11 04:25:40 +02:00
parent a2b8cac8c8
commit 1399871f4d
8 changed files with 27 additions and 12 deletions

View File

@ -23,4 +23,5 @@ mkdir -p /run/openelec
cat > /run/openelec/debug.conf <<EOF
AVAHI_DEBUG="--debug"
XORG_DEBUG="-logverbose 6 -verbose 6"
EOF

View File

@ -193,6 +193,6 @@ post_makeinstall_target() {
}
post_install() {
# enable_service xorg-server.service
enable_service xorg-monitor.path
enable_service xorg-server.path
}

View File

@ -50,12 +50,6 @@ logger -t Xorg "### creating start options ###"
XORG_ARGS="-s 0 -noreset -allowMouseOpenFail"
if [ "$DEBUG" = yes -o -f $HOME/.config/debug.xorg ]; then
XORG_ARGS="$XORG_ARGS -logverbose 6 -verbose 6"
else
XORG_ARGS="$XORG_ARGS -logverbose 0 -verbose 0"
fi
# load user defined xorg.conf, if exist
if [ -f "$XORG_CONF_USER" ]; then
XORG_ARGS="$XORG_ARGS -config $XORG_CONF_USER"
@ -95,4 +89,5 @@ logger -t Xorg "### creating needed directories and symlinks ###"
################################################################################
logger -t Xorg "### starting Xorg with '$DISPLAY vt01 $XORG_ARGS' ###"
echo "X11_ARGS=\"$XORG_ARGS\"" >> /run/X11/xorg-settings.conf
mkdir -p /run/openelec
echo "XORG_ARGS=\"$XORG_ARGS\"" > /run/openelec/xorg-settings.conf

View File

@ -0,0 +1,9 @@
[Unit]
Description=Xorg configfile monitor
After=xorg-server.service
[Path]
PathModified=/run/openelec/debug.conf
[Install]
WantedBy=graphical.target

View File

@ -0,0 +1,10 @@
[Unit]
Description=Xorg configfile monitor
After=xorg-server.service
[Service]
Type=oneshot
ExecStart=/bin/systemctl restart xorg-server.service
[Install]
WantedBy=graphical.target

View File

@ -2,7 +2,7 @@
Description=Xorg server configfile watcher
[Path]
PathExists=/run/X11/xorg-settings.conf
PathExists=/run/openelec/xorg-settings.conf
[Install]
WantedBy=graphical.target

View File

@ -6,8 +6,9 @@ After=multi-user.target
[Service]
Environment=DISPLAY=:0.0
EnvironmentFile=/run/X11/xorg-settings.conf
ExecStart=/usr/bin/Xorg vt01 $X11_ARGS
EnvironmentFile=/run/openelec/xorg-settings.conf
EnvironmentFile=-/run/openelec/debug.conf
ExecStart=/usr/bin/Xorg vt01 $XORG_ARGS $XORG_DEBUG
Restart=always
[Install]

View File

@ -20,4 +20,3 @@
d /var/cache/xkb 0755 root root - -
d /var/lib 0755 root root - -
d /run/X11 0755 root root - -