summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-17 11:54:20 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:59 -0400
commit8bfba8e4ea9d79028918d69cb4e97ec75c0be986 (patch)
treee34566fd55b1afc36283a492ffa9f282da7eae51 /meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
parent6188d4a09af283a5db6b2a5089168463e38b16fd (diff)
downloadmeta-cloud-services-8bfba8e4ea9d79028918d69cb4e97ec75c0be986.tar.gz
python-nova: Minor refactoring
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova_2013.1.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_2013.1.bb17
1 files changed, 14 insertions, 3 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
index aeeacbc..8364fcc 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
@@ -37,7 +37,8 @@ do_install_append() {
37 37
38 # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d 38 # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d
39 install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/ 39 install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/
40 sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" -i ${NOVA_CONF_DIR}/rootwrap.conf 40 sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" \
41 -i ${NOVA_CONF_DIR}/rootwrap.conf
41 chown root:root $NOVA_CONF_DIR/rootwrap.conf 42 chown root:root $NOVA_CONF_DIR/rootwrap.conf
42 43
43 # Set up the rootwrap sudoers for nova 44 # Set up the rootwrap sudoers for nova
@@ -45,7 +46,8 @@ do_install_append() {
45 touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap 46 touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap
46 chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap 47 chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
47 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap 48 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap
48 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > ${D}${sysconfdir}/sudoers.d/nova-rootwrap 49 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \
50 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
49 51
50 #Configuration options 52 #Configuration options
51 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ 53 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
@@ -78,6 +80,16 @@ GROUPADD_PARAM_${PN} = "--system nova"
78USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ 80USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \
79 --no-create-home --shell /bin/false nova" 81 --no-create-home --shell /bin/false nova"
80 82
83PACKAGES += "${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
84
85pkg_postinst_${SRCNAME}-common () {
86 if [ "x$D" != "x" ]; then
87 exit 1
88 fi
89
90 echo "source /etc/nova/openrc" > /home/root/.bashrc
91}
92
81pkg_postinst_${SRCNAME}-controller () { 93pkg_postinst_${SRCNAME}-controller () {
82 if [ "x$D" != "x" ]; then 94 if [ "x$D" != "x" ]; then
83 exit 1 95 exit 1
@@ -95,7 +107,6 @@ pkg_postinst_${SRCNAME}-controller () {
95 nova-manage db sync 107 nova-manage db sync
96} 108}
97 109
98PACKAGES += "${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
99 110
100FILES_${PN} = "${libdir}/*" 111FILES_${PN} = "${libdir}/*"
101 112