Ubuntu Pastebin

Paste from jdstrand at Fri, 29 May 2015 16:30:02 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ cat ./custom-apparmor-cache.conf 
description "Copy precompiled apparmor cache from /custom"
author "Chris Wayne <cwayne@ubuntu.com>"
start on starting click-system-hooks

task

script
    [ -d /custom/cache/apparmor ] && [ -d /custom/lib/apparmor/ ] || exit 0
    # Ordering is important. mtimes for the following must be:
    # click symlink < apparmor profile < apparmor cache
    if [ -d /custom/lib/apparmor/clicks ] && [ -d /var/lib/apparmor/clicks ] ; then
        cp -Pnu /custom/lib/apparmor/clicks/* /var/lib/apparmor/clicks || true
    fi
    if [ -d /custom/lib/apparmor/profiles ] && [ -d /var/lib/apparmor/profiles ] ; then
        cp -nu /custom/lib/apparmor/profiles/* /var/lib/apparmor/profiles || true
    fi
    if [ -d /custom/cache/apparmor ] && [ -d /var/cache/apparmor ] ; then
        cp -nu /custom/cache/apparmor/* /var/cache/apparmor/ || true
    fi
end script

# vim:syntax=upstart
Download as text