diff options
Diffstat (limited to 'meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config')
3 files changed, 25 insertions, 0 deletions
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json new file mode 100644 index 0000000000..fe51aa61b0 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json @@ -0,0 +1,8 @@ +{ + "id": 0, + "revision": 1, + "addn_dev_support": 0, + "manuf_id": 49769, + "prod_id": 1, + "aux": 0 +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh new file mode 100755 index 0000000000..6600ced4a4 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh @@ -0,0 +1,5 @@ +#!/bin/sh -eu + +BMCPOS=$(awk -v RS=" " '/^bmcposition=/{print substr($0,13)}' /proc/cmdline) +sed -r "s/\"id\"\s*:\s*[0-9]+\s*,/\"id\": ${BMCPOS:-0},/" -i \ + /usr/share/ipmi-providers/dev_id.json diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service new file mode 100644 index 0000000000..6471380549 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service @@ -0,0 +1,12 @@ +[Unit] +Description=Set DeviceID for ipmi-host +Before=phosphor-ipmi-host.service + +[Service] +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +ExecStart=/usr/bin/env phosphor-ipmi-config-set-device-id.sh + +[Install] +RequiredBy=phosphor-ipmi-host.service |