2
# Author: Jamie Strandboge <jamie@ubuntu.com>
3
# Copyright (C) 2014 Canonical Ltd.
5
# This script is distributed under the terms and conditions of the GNU General
6
# Public License, Version 3 or later. See http://www.gnu.org/copyleft/gpl.html
10
# Note, we don't need to run apparmor_parser because aa-easyprof will do that
11
# for us if apparmor_parser is found
15
expected_templates_10="default ubuntu-sdk ubuntu-webapp unconfined"
16
expected_templates_11="$expected_templates_10" # no new templates over 1.0
17
# ubuntu-scope-local-content is no longer shipped
18
#expected_templates_12="default ubuntu-scope-network ubuntu-scope-local-content ubuntu-sdk ubuntu-webapp unconfined"
19
expected_templates_12="default ubuntu-push-helper ubuntu-scope-network ubuntu-sdk ubuntu-webapp unconfined"
21
for v in 1.0 1.1 1.2 ; do
22
expected_templates="$expected_templates_10"
23
if [ "$v" = "1.1" ]; then
24
expected_templates="$expected_templates_11"
25
elif [ "$v" = "1.2" ]; then
26
expected_templates="$expected_templates_12"
28
tmp=`aa-easyprof --list-templates --policy-vendor=ubuntu --policy-version=$v`
29
for p in $expected_templates ; do
32
if [ "$p" = "$i" ]; then
37
if [ -z "$found" ]; then
38
echo "Could not find '$p'" >&2
46
for i in $expected_templates ; do
47
if [ "$p" = "$i" ]; then
52
if [ -z "$found" ]; then
53
echo "Found unexpected '$p'" >&2
59
if [ "$rc" = "0" ]; then