meta-openpower: Set unique BMC hostname

To prevent hostnames conflicts this service appends to the default
hostname a Serial Number retrieved from Inventory Manager.

This operation is executed only at the first boot or after a factory reset.
This will be skipped if hostname is manually configured to a non default
value.

(From meta-openpower rev: 55281dffb43c4c59a5fce24727627fa3de1498fe)

Change-Id: I9c3aa7c19cf595a599baab71b2af49defb4b8c76
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service
new file mode 100644
index 0000000..ce59b33
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/first-boot-set-hostname.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Init BMC Hostname
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+ExecStart=/usr/bin/first-boot-set-hostname.sh
+Type=oneshot
+RemainAfterExit=Yes
+
+[Install]
+WantedBy=multi-user.target
+