diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-11-20 00:38:32 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-11-25 15:25:38 -0500 |
commit | bebcf13e5eca199d98a2c94ef1c20da50cba7f51 (patch) | |
tree | 061bbfd39df6c5ec85eeefce05498bed46f55f03 /meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend | |
parent | 466bdc6aed5d2ba0253e0e69f3cde88b11097ff8 (diff) | |
download | meta-cloud-services-bebcf13e5eca199d98a2c94ef1c20da50cba7f51.tar.gz |
initscripts: split into -setup and init packages
Many OpenStack modules require a first boot action to setup up users,
databases, bridges, etc. These same packages install initscripts to start
daemons and servers.
The 1st boot package post install actions immediately exit to indicate
that the action cannot be performed in the cross environment and instead
should be done on first boot. The update-rc.d post install actions are
intended to be run in the cross environment to symlink scripts into the
proper runlevels.
The early exit from the db setup routines, means that the rc files are
not linked in host cross. If the rootfs doesn't contain update-rc.d,
they also will not be set up on first boot. The end result is a system
that does not start all of its required services on boot.
To fix this, we split out db and other first boot setup tasks into
dedicated (but empty) -setup packages. These run on first boot, while
update-rc.d is left to create the proper symlinks.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend')
-rw-r--r-- | meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend b/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend index be7f036..1102ba5 100644 --- a/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend +++ b/meta-openstack/recipes-support/postgresql/postgresql_9.2.4.bbappend | |||
@@ -32,16 +32,20 @@ GROUPADD_PARAM_${PN} = "--system postgres" | |||
32 | USERADD_PARAM_${PN} = "--system --home /var/lib/postgres -g postgres \ | 32 | USERADD_PARAM_${PN} = "--system --home /var/lib/postgres -g postgres \ |
33 | --no-create-home --shell /bin/false postgres" | 33 | --no-create-home --shell /bin/false postgres" |
34 | 34 | ||
35 | pkg_postinst_${PN} () { | 35 | PACKAGES += " ${PN}-setup" |
36 | ALLOW_EMPTY_${PN}-setup = "1" | ||
37 | RDEPENDS_${PN} += " ${PN}-setup" | ||
38 | |||
39 | pkg_postinst_${PN}-setup () { | ||
36 | # postgres 9.2.4 postinst | 40 | # postgres 9.2.4 postinst |
37 | if [ "x$D" != "x" ]; then | 41 | if [ "x$D" != "x" ]; then |
38 | exit 1 | 42 | exit 1 |
39 | fi | 43 | fi |
40 | 44 | ||
41 | /etc/init.d/postgresql-init | 45 | /etc/init.d/postgresql-init |
42 | if [ $? -eq 0 ]; then | 46 | if [ $? -eq 0 ]; then |
43 | echo "[ERROR] postgres: unable to create admin account" | 47 | echo "[ERROR] postgres: unable to create admin account" |
44 | exit 1 | 48 | exit 1 |
45 | fi | 49 | fi |
46 | } | 50 | } |
47 | 51 | ||