systemd: add debug config script and service, add avahi debug options

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-11 00:25:22 +02:00
parent 44504b8c63
commit cf90aeee41
3 changed files with 41 additions and 0 deletions

View File

@ -105,6 +105,7 @@ post_makeinstall_target() {
# copy openelec helper scripts
mkdir -p $INSTALL/lib/systemd/
cp $PKG_DIR/scripts/openelec-debugconfig $INSTALL/lib/systemd/
cp $PKG_DIR/scripts/openelec-userconfig $INSTALL/lib/systemd/
# provide 'halt', 'shutdown', 'reboot' & co.
@ -159,5 +160,6 @@ post_install() {
add_group utmp 22
enable_service machine-id.service
enable_service debugconfig.service
enable_service userconfig.service
}

View File

@ -0,0 +1,26 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
mkdir -p /run/openelec
cat > /run/openelec/debug.conf <<EOF
AVAHI_DEBUG="--debug"
EOF

View File

@ -0,0 +1,13 @@
[Unit]
Description=Setup debug config
DefaultDependencies=no
Before=sysinit.target
ConditionKernelCommandLine=debugging
[Service]
Type=oneshot
ExecStart=/lib/systemd/openelec-debugconfig
[Install]
WantedBy=sysinit.target