rsyslogd: don't start without actions

Rsyslog is currently used only for remote logging. The daemon would run
though (started by systemd) even when remote logging has not been
configured. In other words, it would run without any actions.

With Yocto 2.6, rsyslogd won't run without any actions. Hence, start
rsyslogd on demand - only when remote logging is configured.

(From meta-phosphor rev: 37bc1a3568f2e87987be05243627a984dc051de1)

Change-Id: Ic895ea80b2fb2537a25d1d40d4ae156f3d95c629
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/recipes-extended/rsyslog/files/rsyslog-override.conf b/meta-phosphor/recipes-extended/rsyslog/files/rsyslog-override.conf
index d5084b1..faeeae0 100644
--- a/meta-phosphor/recipes-extended/rsyslog/files/rsyslog-override.conf
+++ b/meta-phosphor/recipes-extended/rsyslog/files/rsyslog-override.conf
@@ -2,3 +2,5 @@
 # This service is restarted when an rsyslog property is set, so
 # disable rate limiting to allow it to always be restarted.
 StartLimitIntervalSec=0
+# This file exists only if remote logging has been configured
+ConditionPathExists=/etc/rsyslog.d/server.conf
diff --git a/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf b/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf
deleted file mode 100644
index 5c8161b..0000000
--- a/meta-phosphor/recipes-extended/rsyslog/rsyslog/server.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Remote Logging (we use TCP for reliable delivery)
-#*.* @@remote-host:port
diff --git a/meta-phosphor/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-phosphor/recipes-extended/rsyslog/rsyslog_%.bbappend
index 0a2fb33..3901844 100644
--- a/meta-phosphor/recipes-extended/rsyslog/rsyslog_%.bbappend
+++ b/meta-phosphor/recipes-extended/rsyslog/rsyslog_%.bbappend
@@ -2,15 +2,9 @@
 
 SRC_URI += " \
     file://rsyslog.conf \
-    file://server.conf \
 "
 
 PACKAGECONFIG ??= " \
     rsyslogd rsyslogrt inet regexp uuid \
     ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
 "
-
-do_install_append(){
-    install -m 0644 -D ${WORKDIR}/server.conf \
-        ${D}${sysconfdir}/rsyslog.d/server.conf
-}