[PATCH openbmc 2/3] Set PYTHONUNBUFFERED for systemd managed python
OpenBMC Patches
openbmc-patches at stwcx.xyz
Thu Jun 30 00:30:35 AEST 2016
From: Brad Bishop <bradleyb at fuzziesquirrel.com>
This lets python scripts print to the journal.
Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
---
.../common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service | 1 +
meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service | 1 +
meta-phosphor/common/recipes-phosphor/network/network/network.service | 1 +
.../files/obmc-phosphor-example-pydbus.service | 1 +
.../recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service | 1 +
meta-phosphor/common/recipes-phosphor/rest-dbus/files/rest-dbus.service | 1 +
meta-phosphor/common/recipes-phosphor/settings/settings/settings.service | 1 +
meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service | 1 +
8 files changed, 8 insertions(+)
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
index 05d1e80..ff863ea 100644
--- a/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
@@ -7,6 +7,7 @@ Type=dbus
ExecStart=/usr/sbin/phosphor-mapper
BusName=org.openbmc.ObjectMapper
TimeoutStartSec=300
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
index a78c86b..8612b98 100644
--- a/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
@@ -6,6 +6,7 @@ After=obmc-mapper.service
[Service]
Restart=always
ExecStart=/usr/sbin/obmc-rest
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/network/network/network.service b/meta-phosphor/common/recipes-phosphor/network/network/network.service
index 6d0aad7..70df7c5 100644
--- a/meta-phosphor/common/recipes-phosphor/network/network/network.service
+++ b/meta-phosphor/common/recipes-phosphor/network/network/network.service
@@ -3,6 +3,7 @@ Description=Network DBUS object
[Service]
ExecStart=/usr/sbin/netman.py
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
index fbc50d3..27d9bfe 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-example-pydbus/files/obmc-phosphor-example-pydbus.service
@@ -4,6 +4,7 @@ Description=Phosphor OpenBMC QEMU application example
[Service]
Restart=always
ExecStart=/usr/sbin/obmc-phosphor-example-pydbus
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
index fecf835..fc436c1 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-user/files/obmc-phosphor-user.service
@@ -3,6 +3,7 @@ Description=Phosphor OpenBMC user management daemon
[Service]
ExecStart=/usr/sbin/obmc-phosphor-userd
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/rest-dbus/files/rest-dbus.service b/meta-phosphor/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
index 5ad582f..d3bddab 100644
--- a/meta-phosphor/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
+++ b/meta-phosphor/common/recipes-phosphor/rest-dbus/files/rest-dbus.service
@@ -4,3 +4,4 @@ Description=DBUS introspecting REST server.
[Service]
Restart=always
ExecStart=/usr/sbin/rest-dbus
+Environment="PYTHONUNBUFFERED=1"
diff --git a/meta-phosphor/common/recipes-phosphor/settings/settings/settings.service b/meta-phosphor/common/recipes-phosphor/settings/settings/settings.service
index deed98f..816ebea 100755
--- a/meta-phosphor/common/recipes-phosphor/settings/settings/settings.service
+++ b/meta-phosphor/common/recipes-phosphor/settings/settings/settings.service
@@ -3,6 +3,7 @@ Description=Settings DBUS Object
[Service]
ExecStart=/usr/sbin/settings_manager.py
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
index 35b6e6c..c39cc40 100644
--- a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
+++ b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
@@ -4,6 +4,7 @@ Description=Temp placeholder for skeleton function
[Service]
Restart=always
ExecStart=/usr/sbin/system_manager.py
+Environment="PYTHONUNBUFFERED=1"
[Install]
WantedBy=multi-user.target
--
2.9.0
More information about the openbmc
mailing list