diff --git a/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-systemd-fixes-1.patch b/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-systemd-fixes-1.patch new file mode 100644 index 0000000000..73b57b5812 --- /dev/null +++ b/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-systemd-fixes-1.patch @@ -0,0 +1,182 @@ +From 60dbecad2610d4cc40b48b306d41034221b80e4b Mon Sep 17 00:00:00 2001 +From: lfiebach +Date: Tue, 20 Aug 2013 08:31:02 +0200 +Subject: [PATCH 1/3] fix oe.execute() and service startup + +--- + addon.xml | 2 +- + changelog.txt | 4 ++++ + oe.py | 17 +++++++++++------ + resources/lib/modules/connman.py | 2 +- + 4 files changed, 17 insertions(+), 8 deletions(-) + +diff --git a/addon.xml b/addon.xml +index f2b5b16..13a5fec 100755 +--- a/addon.xml ++++ b/addon.xml +@@ -1,7 +1,7 @@ + + + + +diff --git a/changelog.txt b/changelog.txt +index c2beb90..2590337 100755 +--- a/changelog.txt ++++ b/changelog.txt +@@ -1,3 +1,7 @@ ++2013-08-20 v0.2.9 ++ (fix) wait for execute to close ++ (fix) dont restart services (SYSTEMD) on startup ++ + 2013-08-19 v0.2.8 + (change) move service configs to .cache/settings/*.conf + +diff --git a/oe.py b/oe.py +index d3db4b4..3d73151 100755 +--- a/oe.py ++++ b/oe.py +@@ -116,8 +116,8 @@ def _(code): + return __addon__.getLocalizedString(code) + + def dbg_log(source, text, level=4): +- if os.environ.get('DEBUG', 'no') == 'no': +- return ++ #if os.environ.get('DEBUG', 'no') == 'no': ++ # return + + xbmc.log('## OpenELEC Addon ## ' + source + ' ## ' + text, level) + xbmc.log(traceback.format_exc()) +@@ -177,7 +177,8 @@ def execute(command_line, get_result=0): + shell=True, + close_fds=True) + +- return process.pid ++ process.wait() ++ + else: + result = '' + process = subprocess.Popen(command_line, +@@ -185,6 +186,9 @@ def execute(command_line, get_result=0): + close_fds=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) ++ ++ process.wait() ++ + for line in process.stdout.readlines(): + result = result + line + +@@ -300,9 +304,10 @@ def set_service(service, options, state): + if os.path.exists(cfo): + os.rename(cfo, cfn) + +- if service in defaults._services: +- for svc in defaults._services[service]: +- execute("systemctl restart %s" % svc) ++ if not __oe__.is_service: ++ if service in defaults._services: ++ for svc in defaults._services[service]: ++ execute("systemctl restart %s" % svc) + + dbg_log('oe::set_service', 'exit_function') + except Exception, e: +diff --git a/resources/lib/modules/connman.py b/resources/lib/modules/connman.py +index 4d2cf73..a91611f 100755 +--- a/resources/lib/modules/connman.py ++++ b/resources/lib/modules/connman.py +@@ -1715,7 +1715,6 @@ def do_init(self): + self.oe.dbg_log('connman::do_init', 'enter_function', 0) + + self.visible = True +- self.load_values() + + self.oe.dbg_log('connman::do_init', 'exit_function', 0) + except Exception, e: +@@ -2533,6 +2532,7 @@ def start_service(self): + self.oe.dbg_log('connman::start_service', 'enter_function', + 0) + ++ self.load_values() + self.mount_drives() + + self.oe.dbg_log('connman::start_service', 'exit_function', +-- +1.8.1.6 + + +From 3fb2e3dcb86a6aeb5492fe85baba6f78ea874456 Mon Sep 17 00:00:00 2001 +From: lufi +Date: Tue, 20 Aug 2013 08:32:43 +0200 +Subject: [PATCH 2/3] Update oe.py + +--- + oe.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/oe.py b/oe.py +index 3d73151..32d7d22 100755 +--- a/oe.py ++++ b/oe.py +@@ -116,8 +116,8 @@ def _(code): + return __addon__.getLocalizedString(code) + + def dbg_log(source, text, level=4): +- #if os.environ.get('DEBUG', 'no') == 'no': +- # return ++ if os.environ.get('DEBUG', 'no') == 'no': ++ return + + xbmc.log('## OpenELEC Addon ## ' + source + ' ## ' + text, level) + xbmc.log(traceback.format_exc()) +-- +1.8.1.6 + + +From 529542f8c2edf71412b0329460a7e76d895a58bf Mon Sep 17 00:00:00 2001 +From: lufi +Date: Tue, 20 Aug 2013 22:24:21 +0200 +Subject: [PATCH 3/3] hide syslog in systemd + +--- + resources/lib/modules/services.py | 21 +++++++++++---------- + 1 file changed, 11 insertions(+), 10 deletions(-) + +diff --git a/resources/lib/modules/services.py b/resources/lib/modules/services.py +index d4d96a6..eef7248 100755 +--- a/resources/lib/modules/services.py ++++ b/resources/lib/modules/services.py +@@ -469,16 +469,17 @@ def load_values(self): + else: + self.struct['cron']['hidden'] = 'true' + +- #SYSLOG +- if os.path.isfile(self.SYSLOG_DAEMON): +- self.struct['syslog']['settings']['syslog_remote']['value'] = \ +- self.oe.get_service_option('syslogd', 'SYSLOG_REMOTE', +- self.D_SYSLOG_REMOTE).replace('true','1').replace('false','0').replace('"', '') +- self.struct['syslog']['settings']['syslog_server']['value'] = \ +- self.oe.get_service_option('syslogd', 'SYSLOG_SERVER', +- self.D_SYSLOG_SERVER).replace('"', '') +- else: +- self.struct['syslog']['hidden'] = 'true' ++ #SYSLOG ++ self.struct['syslog']['hidden'] = 'true' ++ #if os.path.isfile(self.SYSLOG_DAEMON): ++ # self.struct['syslog']['settings']['syslog_remote']['value'] = \ ++ # self.oe.get_service_option('syslogd', 'SYSLOG_REMOTE', ++ # self.D_SYSLOG_REMOTE).replace('true','1').replace('false','0').replace('"', '') ++ # self.struct['syslog']['settings']['syslog_server']['value'] = \ ++ # self.oe.get_service_option('syslogd', 'SYSLOG_SERVER', ++ # self.D_SYSLOG_SERVER).replace('"', '') ++ #else: ++ # self.struct['syslog']['hidden'] = 'true' + + #BLUEZ / OBEX + if 'bluetooth' in self.oe.dictModules: +-- +1.8.1.6 + diff --git a/packages/sysutils/busybox/init.d/05_syslogd b/packages/sysutils/busybox/init.d/05_syslogd deleted file mode 100644 index 86617fd93a..0000000000 --- a/packages/sysutils/busybox/init.d/05_syslogd +++ /dev/null @@ -1,63 +0,0 @@ -################################################################################ -# 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 -################################################################################ - -# -# start syslog daemon -# -# runlevels: openelec, textmode - -( - # can be called from openelec addon. - # ensure that environment is sane - . /etc/profile - - SYSLOG_REMOTE=false - if [ -e $CONFIG_CACHE/services/syslog.conf ] ; then - . $CONFIG_CACHE/services/syslog.conf - fi - - SYSLOGD_OPTIONS="-L" - - if [ "$SYSLOG_REMOTE" == "true" -a "$SYSLOG_SERVER" ]; then - SYSLOGD_OPTIONS="-R $SYSLOG_SERVER $SYSLOGD_OPTIONS" - fi - - if [ -f /storage/.config/syslog.conf ]; then - SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -f /storage/.config/syslog.conf" - fi - - if [ "$DEBUG" = yes ]; then - SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -b 99 -s 1024" - fi - - - rm /var/run/syslogd.pid &>/dev/null - - syslogd $SYSLOGD_OPTIONS - - progress "Starting Syslog daemon" - - if [ "$SYSLOG_REMOTE" == "true" -a "$SYSLOG_SERVER" ]; then - sleep 3 - fi - - progress "Starting Kernellog daemon" - klogd -)&