phosphor-event: Convert options to config file
The systemd unit file for phosphor-event currently hard
codes the maximum buffer size. Convert this to a systemd
EnvironmentFile so that it can more easily be replaced or
changed on individual systems.
Resolves openbmc/openbmc#216.
Change-Id: I17d471a872248190ca6eace41bc2ea41eb60bee6
Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
diff --git a/common/recipes-phosphor/obmc-phosphor-event/files/eventd.conf b/common/recipes-phosphor/obmc-phosphor-event/files/eventd.conf
new file mode 100644
index 0000000..b50dfbc
--- /dev/null
+++ b/common/recipes-phosphor/obmc-phosphor-event/files/eventd.conf
@@ -0,0 +1,4 @@
+LOG_SIZE_LIMIT="197376"
+LOG_COUNT_LIMIT="128"
+
+OPTIONS="-s ${LOG_SIZE_LIMIT} -t ${LOG_COUNT_LIMIT}"
diff --git a/common/recipes-phosphor/obmc-phosphor-event/files/obmc-phosphor-event.service b/common/recipes-phosphor/obmc-phosphor-event/files/obmc-phosphor-event.service
index 065cc55..a93fce0 100644
--- a/common/recipes-phosphor/obmc-phosphor-event/files/obmc-phosphor-event.service
+++ b/common/recipes-phosphor/obmc-phosphor-event/files/obmc-phosphor-event.service
@@ -2,8 +2,9 @@
Description=Phosphor OpenBMC event management daemon
[Service]
+EnvironmentFile=-/etc/default/eventd/eventd.conf
Restart=always
-ExecStart=/usr/sbin/obmc-phosphor-eventd -s 200000 -t 128
+ExecStart=/usr/sbin/obmc-phosphor-eventd $OPTIONS
[Install]
WantedBy=multi-user.target