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

Proposed by Andres Rodriguez
Status: Superseded
Proposed branch: lp:~andreserl/maas/packaging_lp1381603
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 59 lines (+27/-2)
3 files modified
debian/changelog (+4/-2)
debian/maas-common.logrotate (+9/-0)
debian/maas-common.postinst (+14/-0)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_lp1381603
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Gavin Panella (community) Approve
Review via email: mp+259098@code.launchpad.net

This proposal has been superseded by a proposal from 2015-05-14.

Commit message

debian/maas-common.{postinst,logrotate}: Create maas.log if non-existent
and add log rotation, provided maas.log exists both in the Region
and in the Cluster (LP: #1381603)

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Looks good, but with a few comments.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) :
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve
Revision history for this message
Adam Collard (adam-collard) :

Unmerged revisions

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 2015-05-09 14:03:35 +0000
3+++ debian/changelog 2015-05-14 11:03:04 +0000
4@@ -1,6 +1,8 @@
5-maas (1.8.0~beta6+bzr3867-0ubuntu1) UNRELEASED; urgency=medium
6+maas (1.8.0~beta6+bzr3891-0ubuntu1) UNRELEASED; urgency=medium
7
8- * UNRELEASED
9+ * debian/maas-common.{postinst,logrotate}: Create maas.log if non-existent
10+ and add log rotation, provided maas.log exists both in the Region
11+ and in the Cluster (LP: #1381603)
12
13 -- Andres Rodriguez <andreserl@ubuntu.com> Sat, 09 May 2015 15:03:17 +0100
14
15
16=== added file 'debian/maas-common.logrotate'
17--- debian/maas-common.logrotate 1970-01-01 00:00:00 +0000
18+++ debian/maas-common.logrotate 2015-05-14 11:03:04 +0000
19@@ -0,0 +1,9 @@
20+/var/log/maas/maas.log
21+{
22+ rotate 7
23+ daily
24+ missingok
25+ notifempty
26+ delaycompress
27+ compress
28+}
29
30=== modified file 'debian/maas-common.postinst'
31--- debian/maas-common.postinst 2014-12-04 19:32:00 +0000
32+++ debian/maas-common.postinst 2015-05-14 11:03:04 +0000
33@@ -2,6 +2,19 @@
34
35 set -e
36
37+create_log_dir(){
38+ # Main syslog file.
39+ if [ ! -f /var/log/maas/maas.log ]; then
40+ mkdir -p /var/log/maas
41+ touch /var/log/maas/maas.log
42+ fi
43+
44+ # Give appropriate permissions
45+ chown -R maas:maas /var/lib/maas/
46+ chown syslog:syslog /var/log/maas/maas.log
47+
48+}
49+
50 add_user_group(){
51 local user="maas"
52 local group="maas"
53@@ -13,5 +26,6 @@
54 ln -sf /usr/share/maas/maas-rsyslog.conf /etc/rsyslog.d/99-maas.conf
55
56 add_user_group
57+create_log_dir
58
59 #DEBHELPER#

Subscribers

People subscribed via source and target branches

to all changes: