commit | 8a5ccbb517cf877852caae3acf07fd43586f9a8f | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Jan 20 10:57:05 2021 -0600 |
committer | Adriana Kobylak <anoo@us.ibm.com> | Wed Jan 27 15:54:39 2021 -0600 |
tree | 31a0f3d8bd822e5062563fea72a451de56e36c68 | |
parent | 0a06e97ff30ba125f13bfcbe2adaaeb1e5333a68 [diff] |
utils: Add execute command As issue openbmc/phosphor-bmc-code-mgmt#6 describes, the code makes use of the systemd services to execute commands via a script, but calls to systemd service files are async, so if there is a need to wait for the service to finish executing, workarounds like sleep commands have been added to the code, ex: https://github.com/openbmc/phosphor-bmc-code-mgmt/commit/60f5ccfd5ab0fc8cedc3a2bf5f5adcab77318b7d Create a function that would execute a command in a child process so that it's possible to wait for it to finish. In addition, errors can be more obvious by checking the return of the execute function and taking action to notify the caller of the error instead of relying on system unit dependencies to run recovery actions on error. Tested: Called new execute function from the code and verified it was successful. Ex: utils::execute("/bin/mkdir", "/tmp/test-execute"); Change-Id: I81a6aa0a50276abb6aba40196a214629ec9baa13 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson build
ninja -C build
To clean the repository run rm -r build
.