diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2017-11-15 12:59:53 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-11-15 15:53:38 -0500 |
commit | 3051160f23fe8e06e545859538c86ef3a3c39d7a (patch) | |
tree | 97f922e30173df31dda04f10cca3beea27652eb8 /meta-openstack/recipes-support | |
parent | 3d512115129e2cea97067d23cb72fea62b70dd39 (diff) | |
download | meta-cloud-services-3051160f23fe8e06e545859538c86ef3a3c39d7a.tar.gz |
python-*: fixup postinst scripts
Checking for "$D" and doing an "exit 1" now results in errors such as:
[log_check] warning: %post(keystone-cronjobs-...) scriptlet failed, exit status 2
during image creation. Instead of escaping the script for "level-1"
(image creation postinst) we wrap the "level-2" (first boot) postinst
in an if statement. This also ensure the scriptlet in
indentity.bbclass is less prone to behaving differently based on the
postinsts defined in the classes which inherit 'identity'.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support')
-rw-r--r-- | meta-openstack/recipes-support/postgresql/postgresql_9.%.bbappend | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/meta-openstack/recipes-support/postgresql/postgresql_9.%.bbappend b/meta-openstack/recipes-support/postgresql/postgresql_9.%.bbappend index 22dae71..b26054e 100644 --- a/meta-openstack/recipes-support/postgresql/postgresql_9.%.bbappend +++ b/meta-openstack/recipes-support/postgresql/postgresql_9.%.bbappend | |||
@@ -41,14 +41,12 @@ ALLOW_EMPTY_${PN}-setup = "1" | |||
41 | 41 | ||
42 | pkg_postinst_${PN}-setup () { | 42 | pkg_postinst_${PN}-setup () { |
43 | # postgres 9.2.4 postinst | 43 | # postgres 9.2.4 postinst |
44 | if [ "x$D" != "x" ]; then | 44 | if [ -z "$D" ]; then |
45 | exit 1 | 45 | /etc/init.d/postgresql-init |
46 | fi | 46 | if [ $? -ne 0 ]; then |
47 | 47 | echo "[ERROR] postgres: unable to create admin account" | |
48 | /etc/init.d/postgresql-init | 48 | exit 1 |
49 | if [ $? -ne 0 ]; then | 49 | fi |
50 | echo "[ERROR] postgres: unable to create admin account" | ||
51 | exit 1 | ||
52 | fi | 50 | fi |
53 | } | 51 | } |
54 | 52 | ||