diff mbox

[base,06/13] rsyslog: add use flag to set log dir default is /var/log

Message ID 55dd247604cb488f7990381cd16a4a0474221961.1380529272.git.jacob.kjaergaard@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Jacob Kjaergaard Sept. 30, 2013, 8:23 a.m. UTC
From: Jacob Kjaergaard <jacob@barsoekjaergaard.dk>

---
 recipes/rsyslog/rsyslog.inc |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Esben Haabendal Oct. 14, 2013, 12:07 p.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index e6dc1fe..3ff397d 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -12,11 +12,17 @@  SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \
           file://rsyslog"
 
 inherit autotools-autoreconf sysvinit
-RECIPE_FLAGS = "rsyslog_sysvinit_start"
+RECIPE_FLAGS = "rsyslog_sysvinit_start rsyslog_log_dir"
 DEFAULT_USE_rsyslog_sysvinit_start = "20"
+DEFAULT_USE_rsyslog_log_dir = ""
 do_install[postfuncs] =+ "do_install_conf"
 do_install_conf() {
 	sysvinit_install_script ${SRCDIR}/${PN}
+
+	if [ -n "${USE_rsyslog_log_dir}" ]; then	
+	  sed 's#/var/log#${USE_rsyslog_log_dir}#' -i ${SRCDIR}/rsyslog.conf
+	fi
+
 	install ${SRCDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
 }