Merge lp:~smoser/maas/packaging.aa-update into lp:~maas-maintainers/maas/packaging

Proposed by Scott Moser on 2012-09-14
Status: Merged
Approved by: Andres Rodriguez on 2012-09-14
Approved revision: 85
Merged at revision: 85
Proposed branch: lp:~smoser/maas/packaging.aa-update
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 47 lines (+20/-2)
3 files modified
debian/changelog (+3/-2)
debian/maas-dhcp.postinst (+8/-0)
debian/maas-dhcp.postrm (+9/-0)
To merge this branch: bzr merge lp:~smoser/maas/packaging.aa-update
Reviewer Review Type Date Requested Status
Andres Rodriguez 2012-09-14 Approve on 2012-09-14
Review via email: mp+124478@code.launchpad.net

Commit Message

On install and removal of maas-dhcp invoke apparmor update

Description of the Change

On install and removal of maas-dhcp invoke apparmor update

To post a comment you must log in.
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-09-13 03:13:19 +0000
3+++ debian/changelog 2012-09-14 17:00:25 +0000
4@@ -1,8 +1,9 @@
5 maas (0.1+bzr987+dfsg-0ubuntu3) UNRELEASED; urgency=low
6
7 [ Scott Moser ]
8- * debian/maas-dhcp.{install,apparmor} install apparmor profile into
9- /etc/apparmor.d/dhcpd.d (LP: #1049177)
10+ * debian/maas-dhcp.{install,apparmor,postrm} install apparmor profile into
11+ /etc/apparmor.d/dhcpd.d (LP: #1049177), and update apparmor profile for
12+ /usr/sbin/dhcpd on install/remove
13
14 [ Andres Rodriguez ]
15 * debian/maas.postinst: Always restart apache2.
16
17=== modified file 'debian/maas-dhcp.postinst'
18--- debian/maas-dhcp.postinst 2012-09-14 01:27:09 +0000
19+++ debian/maas-dhcp.postinst 2012-09-14 17:00:25 +0000
20@@ -35,5 +35,13 @@
21
22 fi
23
24+if [ "$1" = "configure" ]; then
25+ dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
26+ if [ -f "${dhcpd_prof}" ] &&
27+ command -v apparmor_parser >/dev/null 2>&1; then
28+ apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
29+ fi
30+fi
31+
32 #DEBHELPER#
33 exit 0
34
35=== added file 'debian/maas-dhcp.postrm'
36--- debian/maas-dhcp.postrm 1970-01-01 00:00:00 +0000
37+++ debian/maas-dhcp.postrm 2012-09-14 17:00:25 +0000
38@@ -0,0 +1,9 @@
39+#!/bin/sh -e
40+
41+if [ "$1" = "remove" -o "$1" = "purge" ]; then
42+ dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
43+ if [ -f "${dhcpd_prof}" ] &&
44+ command -v apparmor_parser >/dev/null 2>&1; then
45+ apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
46+ fi
47+fi

Subscribers

People subscribed via source and target branches