Merge lp:~gnuoy/charms/precise/mysql/add-preinstall-hook into lp:charms/mysql

Proposed by Liam Young
Status: Merged
Merged at revision: 106
Proposed branch: lp:~gnuoy/charms/precise/mysql/add-preinstall-hook
Merge into: lp:charms/mysql
Diff against target: 21 lines (+13/-0)
1 file modified
hooks/install (+13/-0)
To merge this branch: bzr merge lp:~gnuoy/charms/precise/mysql/add-preinstall-hook
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+194898@code.launchpad.net

Description of the change

Execute any preinstall code that's in exec.d as part of the install hook.

To post a comment you must log in.
107. By Liam Young

Do preinstall first

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM, Thanks for the submission!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/install'
2--- hooks/install 2013-02-12 17:54:29 +0000
3+++ hooks/install 2013-11-12 16:48:16 +0000
4@@ -1,5 +1,18 @@
5 #!/bin/bash
6
7+# Pre-exec
8+if [[ -d exec.d ]]; then
9+ shopt -s nullglob
10+ for f in exec.d/*/charm-pre-install; do
11+ [[ -x "$f" ]] || continue
12+ ${SHELL} -c "$f"|| {
13+ ## bail out if anyone fails
14+ juju-log -l ERROR "$f: returned exit_status=$? "
15+ exit 1
16+ }
17+ done
18+fi
19+
20 apt-get update
21 apt-get install -y debconf-utils python-mysqldb uuid pwgen dnsutils charm-helper-sh || exit 1
22

Subscribers

People subscribed via source and target branches

to all changes: