Skip to content

Commit

Permalink
Adjusting to live-initramfs.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Sep 23, 2007
1 parent 8fb206f commit 376ae2e
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions scripts/live-bottom/42disable_cups_apparmor 100644 → 100755
@@ -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

0 comments on commit 376ae2e

Please sign in to comment.