Merge lp:~andreserl/maas/packaging_update_lp1065062 into lp:~maas-maintainers/maas/packaging

Proposed by Andres Rodriguez on 2012-10-10
Status: Merged
Approved by: Andres Rodriguez on 2012-10-10
Approved revision: 128
Merged at revision: 128
Proposed branch: lp:~andreserl/maas/packaging_update_lp1065062
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 48 lines (+12/-0)
3 files modified
debian/changelog (+1/-0)
debian/maas-cluster-controller.postinst (+4/-0)
debian/maas-cluster-controller.postrm (+7/-0)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_update_lp1065062
Reviewer Review Type Date Requested Status
Raphaël Badin (community) 2012-10-10 Approve on 2012-10-10
Review via email: mp+128988@code.launchpad.net

Commit Message

debian/maas-cluster-controller.postinst: Create /var/lib/maas. (LP: #1065062)

To post a comment you must log in.
Raphaël Badin (rvb) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-10 15:31:22 +0000
3+++ debian/changelog 2012-10-10 16:13:36 +0000
4@@ -2,6 +2,7 @@
5
6 [ Raphaël Badin ]
7 * debian/maas-region-controller.postinst: Enable proxy_http module.
8+ * debian/maas-cluster-controller.postinst: Create /var/lib/maas. (LP: #1065062)
9
10 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 10 Oct 2012 11:17:21 -0400
11
12
13=== modified file 'debian/maas-cluster-controller.postinst'
14--- debian/maas-cluster-controller.postinst 2012-10-09 18:17:31 +0000
15+++ debian/maas-cluster-controller.postinst 2012-10-10 16:13:36 +0000
16@@ -20,10 +20,14 @@
17
18 create_log_dir() {
19 # create log dir
20+ if [ ! -d /var/lib/maas ]; then
21+ mkdir -p /var/lib/maas
22+ fi
23 if [ ! -d /var/log/maas/oops ]; then
24 mkdir -p /var/log/maas/oops
25 fi
26 # Give appropriate permissions
27+ chown -R maas:maas /var/lib/maas/
28 chown -R maas:maas /var/log/maas
29 chmod -R 775 /var/log/maas/oops
30 }
31
32=== modified file 'debian/maas-cluster-controller.postrm'
33--- debian/maas-cluster-controller.postrm 2012-10-09 18:17:31 +0000
34+++ debian/maas-cluster-controller.postrm 2012-10-10 16:13:36 +0000
35@@ -15,6 +15,13 @@
36 if [ -d /var/log/maas ]; then
37 rm -rf /var/log/maas
38 fi
39+ # remove var directory
40+ rm -rf /var/lib/maas/celerybeat-cluster-schedule
41+ DIR=/var/lib/maas
42+ if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
43+ rm -rf /var/lib/maas
44+ fi
45+
46 esac
47
48 #DEBHELPER#

Subscribers

People subscribed via source and target branches

to all changes: