summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/42disable_apparmor
blob: f87cab4fdda70b1cc1ff4f2b3ad329107ee8921a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

#set -e

# initramfs-tools header

PREREQ=""

prereqs()
{
	echo "${PREREQ}"
}

case "${1}" in
	prereqs)
		prereqs
		exit 0
		;;
esac

# live-initramfs header

if [ -n "${NOAPPARMOR}" ]
then
	exit 0
fi

. /scripts/live-functions

log_begin_msg "Disabling AppArmor (does not work with stacked file systems)"

# live-initramfs script

if [ -x /root/etc/init.d/apparmor ]
then
	chroot /root update-rc.d -f apparmor remove
fi

log_end_msg