diff options
Diffstat (limited to 'meta-openstack/classes/openstack-base.bbclass')
| -rw-r--r-- | meta-openstack/classes/openstack-base.bbclass | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-openstack/classes/openstack-base.bbclass b/meta-openstack/classes/openstack-base.bbclass new file mode 100644 index 0000000..565470b --- /dev/null +++ b/meta-openstack/classes/openstack-base.bbclass | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | inherit hosts | ||
| 2 | |||
| 3 | ROOTFS_POSTPROCESS_COMMAND += "openstack_configure_hosts ; " | ||
| 4 | |||
| 5 | openstack_configure_hosts() { | ||
| 6 | bbnote "openstack: identifying hosts" | ||
| 7 | |||
| 8 | echo "${CONTROLLER_IP} controller" >> ${IMAGE_ROOTFS}/etc/hosts | ||
| 9 | echo "${COMPUTE_IP} compute" >> ${IMAGE_ROOTFS}/etc/hosts | ||
| 10 | echo "${MY_HOST}" > ${IMAGE_ROOTFS}/etc/hostname | ||
| 11 | } | ||
| 12 | |||
