Fix the starting of phosphor-hwmon
After the commit 7ead6495b6d6782dd89951e8bfb26131f35863ec
the phosphor-hwmon failed to start with errors like this:
```
/lib/systemd/system/xyz.openbmc_project.Hwmon@.service:8:
Failed to resolve unit specifiers on %f: Invalid argument
```
It happens when the instance name begins with `/` character which causes
this error when used specifier `%f`.
Besides the specifier `%I` looks less buggy and more appropriate in this
case, because it's the only part of path and will be completed inside
the `phosphor-hwmon-readd`.
This commit fixes the starting of the phosphor-hwmon.
Partially resolves: openbmc/openbmc#3435
Change-Id: I25b622a80a57d872a7471d0f9eae8ca4fc4aecab
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
diff --git a/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh b/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
index cde0f96..cf72528 100755
--- a/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
+++ b/recipes-phosphor/sensors/phosphor-hwmon/start_hwmon.sh
@@ -17,6 +17,7 @@
fi
fi
-path="${path//:/--}"
+path="${path//-/\\x2d}"
+path="${path//:/\\x3a}"
systemctl $action 'xyz.openbmc_project.Hwmon@'$path'.service'