Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fb206f
commit 376ae2e
Showing
1 changed file
with
23 additions
and
14 deletions.
There are no files selected for viewing
37 changes: 23 additions & 14 deletions
37
scripts/live-bottom/42disable_cups_apparmor
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
#!/bin/sh | ||
# workaround for AppArmor bug #131976 | ||
|
||
PREREQ="" | ||
DESCRIPTION="Disabling AppArmor profile for Cups..." | ||
#set -e | ||
|
||
. /scripts/casper-functions | ||
# initramfs-tools header | ||
|
||
PREREQ="" | ||
|
||
prereqs() | ||
{ | ||
echo "$PREREQ" | ||
echo "${PREREQ}" | ||
} | ||
|
||
case $1 in | ||
# get pre-requisites | ||
prereqs) | ||
prereqs | ||
exit 0 | ||
;; | ||
case "${1}" in | ||
prereqs) | ||
prereqs | ||
exit 0 | ||
;; | ||
esac | ||
|
||
log_begin_msg "$DESCRIPTION" | ||
# live-initramfs header | ||
|
||
. /scripts/live-functions | ||
|
||
log_begin_msg "Disabling AppArmor profile for Cups..." | ||
|
||
# live-initramfs script | ||
|
||
# workaround for AppArmor bug #131976 | ||
|
||
PROFILE=/root/etc/apparmor.d/usr.sbin.cupsd | ||
if [ -e "$PROFILE" ]; then | ||
sed -i '/{/ s/{/flags=(complain) {/' $PROFILE | ||
|
||
if [ -e "$PROFILE" ] | ||
then | ||
sed -i '/{/ s/{/flags=(complain) {/' $PROFILE | ||
fi | ||
|
||
log_end_msg |