chassis_service:Create /run/openbmc at start up
Create /run/openbmc directory on startup as other applications and
services within phosphor-state-manager assume it to be already
created. The chassis service is the best place to create the dir
because it always runs first.
Fixes openbmc/phosphor-state-manager#22
Tested: Restarted daemon xyz.openbmc_project.State.Chassis@0.service
and confirmed the presence of /run/openbmc directory
Change-Id: I7b9fedbbd50749e65e8bf8833da70c0422e4f4fe
Signed-off-by: adathatri <anusha.dathatri@gmail.com>
diff --git a/service_files/xyz.openbmc_project.State.Chassis@.service b/service_files/xyz.openbmc_project.State.Chassis@.service
index 84bf4e7..2d20d30 100644
--- a/service_files/xyz.openbmc_project.State.Chassis@.service
+++ b/service_files/xyz.openbmc_project.State.Chassis@.service
@@ -4,6 +4,7 @@
After=org.openbmc.control.Power@%i.service
[Service]
+ExecStartPre=/bin/mkdir -p /run/openbmc/
ExecStart=/usr/bin/phosphor-chassis-state-manager --chassis %i
Restart=always
Type=dbus